Ejemplo n.º 1
0
 def test_its_called_with_run_first_argument(self):
     argv = ['command_name', 'something', 'someotherthing']
     with mock.patch('get_testcases_helper.get_testcases.read_file'
                     ) as mock_f_reader:
         mock_f_reader.return_value = None
         run(argv)
     mock_f_reader.assert_called_once_with(argv[1])
Ejemplo n.º 2
0
 def test_units_are_listed(self):
     argv = self.argv[:]
     argv.append('--units=TestB.')
     opts = run(argv)
     self.assertEqual(set(['TestB.test_b1',
                           'TestB.test_b2',
                           'TestB.test_something_else']), set(opts))
Ejemplo n.º 3
0
 def test_units_are_listed(self):
     argv = self.argv[:]
     argv.append('--units=TestB.')
     opts = run(argv)
     self.assertEqual(
         set([
             'TestB.test_b1', 'TestB.test_b2', 'TestB.test_something_else'
         ]), set(opts))
Ejemplo n.º 4
0
 def test_inherited_units_are_listed_too(self):
     argv = self.argv[:]
     argv.append('--units=TestC.')
     opts = run(argv)
     self.assertIn('TestC.test_b1', set(opts))
Ejemplo n.º 5
0
 def test_empty_units_are_listed_if_not_testcase(self):
     argv = self.argv[:]
     argv.append('--units=TestX.')
     opts = run(argv)
     self.assertEqual([], opts)
Ejemplo n.º 6
0
 def test_units_are_parcially_listed(self):
     argv = self.argv[:]
     argv.append('--units=TestB.test_b')
     opts = run(argv)
     self.assertEqual(set(['TestB.test_b1',
                           'TestB.test_b2']), set(opts))
Ejemplo n.º 7
0
 def test_classes_listed(self):
     opts = run(self.argv)
     self.assertEqual(set(['TestA', 'TestB', 'TestC']), set(opts))
Ejemplo n.º 8
0
 def test_its_called_with_run_first_argument(self):
     argv = ['command_name', 'something', 'someotherthing']
     with mock.patch('get_testcases_helper.get_testcases.read_file') as mock_f_reader:
         mock_f_reader.return_value = None
         run(argv)
     mock_f_reader.assert_called_once_with(argv[1])
Ejemplo n.º 9
0
 def test_inherited_units_are_listed_too(self):
     argv = self.argv[:]
     argv.append('--units=TestC.')
     opts = run(argv)
     self.assertIn('TestC.test_b1', set(opts))
Ejemplo n.º 10
0
 def test_empty_units_are_listed_if_not_testcase(self):
     argv = self.argv[:]
     argv.append('--units=TestX.')
     opts = run(argv)
     self.assertEqual([], opts)
Ejemplo n.º 11
0
 def test_units_are_parcially_listed(self):
     argv = self.argv[:]
     argv.append('--units=TestB.test_b')
     opts = run(argv)
     self.assertEqual(set(['TestB.test_b1', 'TestB.test_b2']), set(opts))
Ejemplo n.º 12
0
 def test_classes_listed(self):
     opts = run(self.argv)
     self.assertEqual(set(['TestA', 'TestB', 'TestC']), set(opts))