Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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'))
Ejemplo n.º 3
0
 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])
Ejemplo n.º 4
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'))
Ejemplo n.º 5
0
    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'))
Ejemplo n.º 6
0
  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'))
Ejemplo n.º 7
0
    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'))
Ejemplo n.º 8
0
  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'))
Ejemplo n.º 9
0
    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'))
Ejemplo n.º 10
0
 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'])
Ejemplo n.º 11
0
 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'])