def test_missing_exclusion(self): req = requirement.parse('name>=1.2')['name'][0][0] self.assertTrue( check._is_requirement_in_global_reqs( req, self.global_reqs['name'], ))
def test_extra_exclusion(self): req = requirement.parse('name>=1.2,!=1.4,!=1.5')['name'][0][0] self.assertFalse( check._is_requirement_in_global_reqs( req, self.global_reqs['name'], ))
def test_min_mismatch(self): req = requirement.parse('name>=1.3,!=1.4')['name'][0][0] self.assertTrue( check._is_requirement_in_global_reqs( req, self.global_reqs['name'], ))
def test_name_mismatch(self): req = requirement.parse('wrongname>=1.2,!=1.4')['wrongname'][0][0] self.assertFalse( check._is_requirement_in_global_reqs( req, self.global_reqs['name'], ))
def test_missing_exclusion(self): req = requirement.parse('name>=1.2')['name'][0][0] self.assertTrue( check._is_requirement_in_global_reqs( req, self.global_reqs['name'], ) )
def test_extra_exclusion(self): req = requirement.parse('name>=1.2,!=1.4,!=1.5')['name'][0][0] self.assertFalse( check._is_requirement_in_global_reqs( req, self.global_reqs['name'], ) )
def test_min_mismatch(self): req = requirement.parse('name>=1.3,!=1.4')['name'][0][0] self.assertTrue( check._is_requirement_in_global_reqs( req, self.global_reqs['name'], ) )
def test_name_mismatch(self): req = requirement.parse('wrongname>=1.2,!=1.4')['wrongname'][0][0] self.assertFalse( check._is_requirement_in_global_reqs( req, self.global_reqs['name'], ) )
def test_match_without_python3_markers(self): req = requirement.parse( textwrap.dedent(""" withmarker>=1.5' """))['withmarker'][0][0] self.assertTrue( check._is_requirement_in_global_reqs( req, self.global_reqs['withmarker'], allow_3_only=True))
def test_match_with_markers(self): req = requirement.parse(textwrap.dedent(""" withmarker>=1.5;python_version=='3.5' """))['withmarker'][0][0] self.assertTrue( check._is_requirement_in_global_reqs( req, self.global_reqs['withmarker'], ) )
def test_match_with_markers(self): req = requirement.parse( textwrap.dedent(""" withmarker>=1.5;python_version=='3.5' """))['withmarker'][0][0] self.assertTrue( check._is_requirement_in_global_reqs( req, self.global_reqs['withmarker'], ))