Exemplo n.º 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"
    )
Exemplo n.º 2
0
def match_module():
    return PyPIMatch(
        filename="filename",
        lineno=12,
        package="umbrella==3.2",
        path="path/to/file.py",
        element=""
    )
Exemplo n.º 3
0
def match_other_package():
    return PyPIMatch(
        filename="filename",
        lineno=12,
        package="poncho==3.2",
        path="some/file.py",
        element="SomeClass"
    )
Exemplo n.º 4
0
def test_wrong_package_format():
    with pytest.raises(NotMatching):
        PyPIMatch("a", 12, "pytest", "path", "element")