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)
def test_spec_arguments(self): test = spec.Spec(['ls', '-al']) # still found the executable self.assertEqual(test.executable, ['/bin/ls', '-al'])
def test_spec_init(self): parent = config.Parser() parent['bootstrap'] = False test = spec.Spec(locate('test02'), parent) self.assertEqual(test.name, 'test02')
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'])
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)