def test__get_step_implementer_name_class_is_not_subclass_of_StepImplementer(self): with self.assertRaisesRegex( TSSCException, re.compile( "Step \(foo\) is configured to use step implementer " "\(tests.helpers.sample_step_implementers.NotSubClassOfStepImplementer\) " "from module \(tests.helpers.sample_step_implementers\) with class name " "\(NotSubClassOfStepImplementer\), and dynamically loads as class " "\(<class 'tests.helpers.sample_step_implementers.NotSubClassOfStepImplementer'>\) " "which is not a subclass of required parent class " "\(<class 'tssc.step_implementer.StepImplementer'>\)." ) ): TSSCFactory._TSSCFactory__get_step_implementer_class('foo', 'tests.helpers.sample_step_implementers.NotSubClassOfStepImplementer')
def test__get_step_implementer_class_exists_include_module(self): self.assertIsNotNone( TSSCFactory._TSSCFactory__get_step_implementer_class( 'foo', 'tests.helpers.sample_step_implementers.FooStepImplementer' ) )
def test__get_step_implementer_class_exists_defaultt_steps_module(self): self.assertIsNotNone( TSSCFactory._TSSCFactory__get_step_implementer_class('package', 'Maven') )
def test__get_step_implementer_name_class_does_not_exist_given_module_path(self): with self.assertRaisesRegex( TSSCException, r"Could not dynamically load step \(foo\) step implementer \(tests.helpers.sample_step_implementers.DoesNotExist\) from module \(tests.helpers.sample_step_implementers\) with class name \(DoesNotExist\)"): TSSCFactory._TSSCFactory__get_step_implementer_class('foo', 'tests.helpers.sample_step_implementers.DoesNotExist')
def test__get_step_implementer_class_does_not_exist_using_default_steps_module(self): with self.assertRaisesRegex( TSSCException, r"Could not dynamically load step \(foo\) step implementer \(bar\) from module \(tssc.step_implementers.foo\) with class name \(bar\)"): TSSCFactory._TSSCFactory__get_step_implementer_class('foo', 'bar')