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