Ejemplo n.º 1
0
 def test_dependency_parsing_empty(self):
     job = JobDefinition({
         'name': 'name',
         'plugin': 'plugin'})
     expected = set()
     observed = job.get_direct_dependencies()
     self.assertEqual(expected, observed)
Ejemplo n.º 2
0
 def test_dependency_parsing_single_word(self):
     job = JobDefinition({
         'name': 'name',
         'plugin': 'plugin',
         'depends': 'word'})
     expected = set(['word'])
     observed = job.get_direct_dependencies()
     self.assertEqual(expected, observed)
Ejemplo n.º 3
0
 def test_depedency_parsing_multiple_commas(self):
     job = JobDefinition({
         'name': 'name',
         'plugin': 'plugin',
         'depends': 'foo,,,,bar'})
     expected = set({'foo', 'bar'})
     observed = job.get_direct_dependencies()
     self.assertEqual(expected, observed)
Ejemplo n.º 4
0
 def test_depedency_parsing_newlines(self):
     job = JobDefinition({
         'name': 'name',
         'plugin': 'plugin',
         'depends': 'foo\nbar\nfroz'})
     expected = set({'foo', 'bar', 'froz'})
     observed = job.get_direct_dependencies()
     self.assertEqual(expected, observed)
Ejemplo n.º 5
0
 def test_dependency_parsing_single_word(self):
     job = JobDefinition({
         'id': 'id',
         'plugin': 'plugin',
         'depends': 'word'
     })
     expected = set(['word'])
     observed = job.get_direct_dependencies()
     self.assertEqual(expected, observed)
Ejemplo n.º 6
0
 def test_dependency_parsing_with_various_separators(self):
     job = JobDefinition({
         'name': 'name',
         'plugin': 'plugin',
         'depends': self.parameters_keymap[
             self.parameters.glue].join(['foo', 'bar', 'froz'])})
     expected = set({'foo', 'bar', 'froz'})
     observed = job.get_direct_dependencies()
     self.assertEqual(expected, observed)
Ejemplo n.º 7
0
 def test_dependency_parsing_with_various_separators(self):
     job = JobDefinition(
         {
             "name": "name",
             "plugin": "plugin",
             "depends": self.parameters_keymap[self.parameters.glue].join(["foo", "bar", "froz"]),
         }
     )
     expected = set({"foo", "bar", "froz"})
     observed = job.get_direct_dependencies()
     self.assertEqual(expected, observed)
Ejemplo n.º 8
0
 def test_dependency_parsing_with_various_separators(self):
     job = JobDefinition({
         'id':
         'id',
         'plugin':
         'plugin',
         'depends':
         self.parameters_keymap[self.parameters.glue].join(
             ['foo', 'bar', 'froz'])
     })
     expected = set({'foo', 'bar', 'froz'})
     observed = job.get_direct_dependencies()
     self.assertEqual(expected, observed)
Ejemplo n.º 9
0
 def test_dependency_parsing_empty(self):
     job = JobDefinition({'id': 'id', 'plugin': 'plugin'})
     expected = set()
     observed = job.get_direct_dependencies()
     self.assertEqual(expected, observed)
Ejemplo n.º 10
0
 def test_dependency_parsing_single_word(self):
     job = JobDefinition({"name": "name", "plugin": "plugin", "depends": "word"})
     expected = set(["word"])
     observed = job.get_direct_dependencies()
     self.assertEqual(expected, observed)
Ejemplo n.º 11
0
 def test_dependency_parsing_empty(self):
     job = JobDefinition({"name": "name", "plugin": "plugin"})
     expected = set()
     observed = job.get_direct_dependencies()
     self.assertEqual(expected, observed)