File: test_version.py

package info (click to toggle)
nbconvert 7.16.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,044 kB
  • sloc: python: 8,394; makefile: 199; javascript: 2
file content (13 lines) | stat: -rw-r--r-- 436 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
from nbconvert.utils.version import check_version


def test_check_version():
    """Test the behaviour of check_version.

    This is mostly used to make sure the pandoc version is appropriate for the library.
    """

    assert check_version("1.19.2.4", "1.12.1")
    assert check_version("2.2.3.2", "1.12.1")
    assert check_version("1.19.2.4", "1.12.1", max_v="2.0")
    assert not check_version("2.2.3.2", "1.12.1", max_v="2.0")