예제 #1
0
 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'],
         ))
예제 #2
0
 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'],
         ))
예제 #3
0
 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'],
         ))
예제 #4
0
 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'],
         ))
예제 #5
0
 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'],
         )
     )
예제 #6
0
 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'],
         )
     )
예제 #7
0
 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'],
         )
     )
예제 #8
0
 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'],
         )
     )
예제 #9
0
 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))
예제 #10
0
 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'],
         )
     )
예제 #11
0
 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'],
         ))