def test_init_argument_parser(self): parser = argparse.ArgumentParser() TestRunner.global_runner().initArgumentParser(parser) args = parser.parse_args() self.assertEquals('.', args.log_dir) self.assertEquals(os.path.splitext(os.path.basename(__main__.__file__))[0], args.log_filebase)
def test_init_bindings_builder(self): builder = ConfigurationBindingsBuilder() TestRunner.global_runner().init_bindings_builder(builder) bindings = builder.build() self.assertEquals('.', bindings.get('log_dir')) self.assertEquals(os.path.splitext(os.path.basename(__main__.__file__))[0], bindings.get('log_filebase'))
def test_init_argument_parser(self): parser = argparse.ArgumentParser() TestRunner.global_runner().initArgumentParser(parser) args = parser.parse_args() self.assertEquals(args.log_dir, '.') self.assertEquals( args.log_filebase, os.path.splitext(os.path.basename(__main__.__file__))[0])
def test_init_bindings_builder(self): """Verify the builtin bindings.""" builder = ConfigurationBindingsBuilder() TestRunner.global_runner().init_bindings_builder(builder) bindings = builder.build() self.assertEquals('.', bindings.get('log_dir')) self.assertEquals(os.path.splitext(os.path.basename(__main__.__file__))[0], bindings.get('log_filebase')) # While not necessarily a design criteria, the implementation has all # the bindings added by all the fixtures. self.assertEquals('MyTestParamValue', bindings.get('TEST_PARAM')) self.assertEquals('MyTestBindingValue', bindings.get('TEST_BINDING'))
def test_init_bindings_builder(self): """Verify the builtin bindings.""" builder = ConfigurationBindingsBuilder() TestRunner.global_runner().init_bindings_builder(builder) bindings = builder.build() self.assertEqual('.', bindings.get('log_dir')) self.assertEqual( os.path.splitext(os.path.basename(__main__.__file__))[0], bindings.get('log_filebase')) # While not necessarily a design criteria, the implementation has all # the bindings added by all the fixtures. self.assertEqual('MyTestParamValue', bindings.get('TEST_PARAM')) self.assertEqual('MyTestBindingValue', bindings.get('TEST_BINDING'))
def test_bindings_from_config(self): """Verify bindings from the implied config file in the TestRunner. We set the config file in the fixture forking this test. """ bindings = TestRunner.global_runner().bindings self.assertEquals('tests/base/bindings_test', bindings.get('config_location'))
def test_bindings_from_config(self): """Verify bindings from the implied config file in the TestRunner. We set the config file in the fixture forking this test. """ bindings = TestRunner.global_runner().bindings self.assertEqual('tests/base/bindings_test', bindings.get('config_location'))
def test_bindings(self): """Verify bindings are set on the runner.""" bindings = TestRunner.global_runner().bindings self.assertEquals('.', bindings['LOG_DIR']) self.assertEquals( os.path.splitext(os.path.basename(__main__.__file__))[0], bindings['LOG_FILEBASE']) # While not necessarily a design criteria, the implementation has all # the bindings added by all the fixtures. self.assertEquals('MyTestParamValue', bindings.get('TEST_PARAM')) self.assertEquals('MyTestBindingValue', bindings.get('TEST_BINDING'))
def test_bindings(self): """Verify bindings are set on the runner.""" bindings = TestRunner.global_runner().bindings self.assertEqual('.', bindings['LOG_DIR']) self.assertEqual( os.path.splitext(os.path.basename(__main__.__file__))[0], bindings['LOG_FILEBASE']) # While not necessarily a design criteria, the implementation has all # the bindings added by all the fixtures. self.assertEqual('MyTestParamValue', bindings.get('TEST_PARAM')) self.assertEqual('MyTestBindingValue', bindings.get('TEST_BINDING'))
def test_bindings(self): self.assertEquals('.', TestRunner.global_runner().bindings['LOG_DIR']) self.assertEquals( os.path.splitext(os.path.basename(__main__.__file__))[0], TestRunner.global_runner().bindings['LOG_FILEBASE'])