Exemplo n.º 1
0
 def test_set_language_stops_on_not_supported(self):
     spy = Spy()
     input = {
         'compiler': 'c',
         'flags': [],
         'source': 'test.java',
         'language': 'java'
     }
     self.assertEquals(dict(), sut.language_check(input, spy.call))
     self.assertIsNone(spy.arg)
Exemplo n.º 2
0
 def test_set_language_stops_on_not_supported(self):
     spy = Spy()
     input = {
         'compiler': 'c',
         'flags': [],
         'file': 'test.java',
         'language': 'java'
     }
     self.assertIsNone(sut.language_check(input, spy.call))
     self.assertIsNone(spy.arg)
Exemplo n.º 3
0
 def language(expected, input):
     spy = Spy()
     input.update({'language': None, 'flags': []})
     self.assertEqual(spy.success, sut.language_check(input, spy.call))
     self.assertEqual(expected, spy.arg['language'])
Exemplo n.º 4
0
 def flags(expected, input):
     spy = Spy()
     input.update({'compiler': 'c', 'source': 'test.c'})
     self.assertEqual(spy.success, sut.language_check(input, spy.call))
     self.assertEqual(expected, spy.arg['flags'])
Exemplo n.º 5
0
 def language(expected, input):
     spy = Spy()
     input.update({'language': None, 'flags': []})
     self.assertEqual(spy.success, sut.language_check(input, spy.call))
     self.assertEqual(expected, spy.arg['language'])
Exemplo n.º 6
0
 def flags(expected, input):
     spy = Spy()
     input.update({'compiler': 'c', 'file': 'test.c'})
     self.assertEqual(spy.success, sut.language_check(input, spy.call))
     self.assertEqual(expected, spy.arg['flags'])