test_version.py 433 B

123456789101112
  1. from ..version import check_version
  2. def test_check_version():
  3. """Test the behaviour of check_versionself.
  4. This is mostly used to make sure the pandoc version is appropriate for the library.
  5. """
  6. assert check_version('1.19.2.4', '1.12.1')
  7. assert check_version('2.2.3.2', '1.12.1')
  8. assert check_version('1.19.2.4', '1.12.1', max_v='2.0')
  9. assert not check_version('2.2.3.2', '1.12.1', max_v='2.0')