示例#1
0
 def test_spec_config_parent(self):
     parent = config.Parser()
     parent['bootstrap'] = False
     test = spec.Spec(locate('test02'), parent)
     self.assertEqual(test.name, 'test02')
     self.assertEqual(test.executable, [os.path.abspath(locate('test02'))])
     self.assertEqual(test.setup, ['setup02'])
     self.assertEqual(test.bootstrap, False)
     self.assertEqual(test.reset, True)
示例#2
0
 def test_spec_arguments(self):
     test = spec.Spec(['ls', '-al'])
     # still found the executable
     self.assertEqual(test.executable, ['/bin/ls', '-al'])
示例#3
0
 def test_spec_init(self):
     parent = config.Parser()
     parent['bootstrap'] = False
     test = spec.Spec(locate('test02'), parent)
     self.assertEqual(test.name, 'test02')
示例#4
0
 def test_spec_config(self):
     test = spec.Spec(locate('test02'))
     self.assertEqual(test.name, 'test02')
     self.assertEqual(test.executable, [os.path.abspath(locate('test02'))])
     # Verify we got a default config file representation
     self.assertEqual(test.setup, ['setup02'])
示例#5
0
 def test_spec_no_config(self):
     test = spec.Spec(locate('test01'))
     self.assertEqual(test.name, os.path.basename(locate('test01')))
     self.assertEqual(test.executable, [os.path.abspath(locate('test01'))])
     # Verify we got a default config file representation
     self.assertEqual(test.virtualenv, False)