示例#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])))
示例#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])))
示例#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])))
示例#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])))
示例#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)))
示例#6
0
 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)))
示例#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)))
示例#9
0
 def test_duplicate_pythons(self):
     with testtools.ExpectedException(Exception):
         list(generate._combine_freezes([('2.7', []), ('2.7', [])]))
示例#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])))
示例#11
0
 def test_duplicate_pythons(self):
     with testtools.ExpectedException(Exception):
         list(generate._combine_freezes([('2.7', []), ('2.7', [])]))
示例#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])))