Beispiel #1
0
def match_other_version_other_file():
    return PyPIMatch(
        filename="filename",
        lineno=12,
        package="umbrella==3.4",
        path="path/to/other_file.py",
        element="MyClass"
    )
Beispiel #2
0
def match_module():
    return PyPIMatch(
        filename="filename",
        lineno=12,
        package="umbrella==3.2",
        path="path/to/file.py",
        element=""
    )
Beispiel #3
0
def match_other_package():
    return PyPIMatch(
        filename="filename",
        lineno=12,
        package="poncho==3.2",
        path="some/file.py",
        element="SomeClass"
    )
Beispiel #4
0
def test_wrong_package_format():
    with pytest.raises(NotMatching):
        PyPIMatch("a", 12, "pytest", "path", "element")