Beispiel #1
0
 def test_different_versions(self):
     freeze_27 = ('2.7', [('fixtures', '1.2.0')])
     freeze_34 = ('3.4', [('fixtures', '1.5.0')])
     self.assertEqual(
         ["fixtures===1.2.0;python_version=='2.7'\n",
          "fixtures===1.5.0;python_version=='3.4'\n"],
         list(generate._combine_freezes([freeze_27, freeze_34])))
Beispiel #2
0
 def test_same_items(self):
     fixtures = [('fixtures', '1.2.0')]
     freeze_27 = ('2.7', fixtures)
     freeze_34 = ('3.4', fixtures)
     self.assertEqual(
         ['fixtures===1.2.0\n'],
         list(generate._combine_freezes([freeze_27, freeze_34])))
Beispiel #3
0
 def test_different_versions(self):
     freeze_27 = ('2.7', [('fixtures', '1.2.0')])
     freeze_34 = ('3.4', [('fixtures', '1.5.0')])
     self.assertEqual([
         "fixtures===1.2.0;python_version=='2.7'\n",
         "fixtures===1.5.0;python_version=='3.4'\n"
     ], list(generate._combine_freezes([freeze_27, freeze_34])))
Beispiel #4
0
 def test_same_items(self):
     fixtures = [('fixtures', '1.2.0')]
     freeze_27 = ('2.7', fixtures)
     freeze_34 = ('3.4', fixtures)
     self.assertEqual(['fixtures===1.2.0\n'],
                      list(generate._combine_freezes([freeze_27,
                                                      freeze_34])))
Beispiel #5
0
 def test_blacklist(self):
     blacklist = ['Fixtures']
     freeze_27 = ('2.7', [('fixtures', '1.2.0')])
     freeze_34 = ('3.4', [('fixtures', '1.2.0'), ('enum', '1.5.0')])
     self.assertEqual(
         ["enum===1.5.0;python_version=='3.4'\n"],
         list(generate._combine_freezes(
             [freeze_27, freeze_34], blacklist=blacklist)))
 def test_blacklist_with_safe_name(self):
     blacklist = ['flake8_docstrings']
     freeze_27 = ('2.7', [('flake8-docstrings', '0.2.1.post1'),
                          ('enum', '1.5.0')])
     self.assertEqual(
         ['enum===1.5.0\n'],
         list(generate._combine_freezes(
             [freeze_27], blacklist=blacklist)))
Beispiel #7
0
 def test_blacklist(self):
     blacklist = ['Fixtures']
     freeze_27 = ('2.7', [('fixtures', '1.2.0')])
     freeze_34 = ('3.4', [('fixtures', '1.2.0'), ('enum', '1.5.0')])
     self.assertEqual(["enum===1.5.0;python_version=='3.4'\n"],
                      list(
                          generate._combine_freezes([freeze_27, freeze_34],
                                                    blacklist=blacklist)))
 def test_blacklist_with_safe_name(self):
     blacklist = ['flake8_docstrings']
     freeze_27 = ('2.7', [('flake8-docstrings', '0.2.1.post1'),
                          ('enum', '1.5.0')])
     self.assertEqual(['enum===1.5.0\n'],
                      list(
                          generate._combine_freezes([freeze_27],
                                                    blacklist=blacklist)))
Beispiel #9
0
 def test_duplicate_pythons(self):
     with testtools.ExpectedException(Exception):
         list(generate._combine_freezes([('2.7', []), ('2.7', [])]))
Beispiel #10
0
 def test_distinct_items(self):
     freeze_27 = ('2.7', [('fixtures', '1.2.0')])
     freeze_34 = ('3.4', [('fixtures', '1.2.0'), ('enum', '1.5.0')])
     self.assertEqual(
         ["enum===1.5.0;python_version=='3.4'\n", 'fixtures===1.2.0\n'],
         list(generate._combine_freezes([freeze_27, freeze_34])))
Beispiel #11
0
 def test_duplicate_pythons(self):
     with testtools.ExpectedException(Exception):
         list(generate._combine_freezes([('2.7', []), ('2.7', [])]))
Beispiel #12
0
 def test_distinct_items(self):
     freeze_27 = ('2.7', [('fixtures', '1.2.0')])
     freeze_34 = ('3.4', [('fixtures', '1.2.0'), ('enum', '1.5.0')])
     self.assertEqual(
         ["enum===1.5.0;python_version=='3.4'\n", 'fixtures===1.2.0\n'],
         list(generate._combine_freezes([freeze_27, freeze_34])))