def setupClass(cls): env_props = { "a": { "A": "AA" }, "b - b": { "B": "BB" }, "default": { "C": "CC" } } with zone(None): environment(env_props)(DummyTests) with zone(cls.zone_name): environment(env_props)(ZoneDummyTests)
def test_apply(self): old_tests = ["test_nothing", "test_fail"] new_tests = ["test_nothing_on_environment_a", "test_nothing_on_environment_b", "test_fail_on_environment_a", "test_fail_on_environment_b"] clazz = environment({"a":"A", "b":"B"})(self.DummyTests) for name in old_tests: assert name not in clazz.__dict__ for name in new_tests: assert name in clazz.__dict__
def setupClass(cls): env_props = {"a": {"A": "AA"}, "b - b": {"B": "BB"}, "default": {"C": "CC"}} with zone(None): environment(env_props)(DummyTests) with zone(cls.zone_name): environment(env_props)(ZoneDummyTests)
def setUpClass(cls): cls.clazz = environment({"a":{"A":"AA"}, "b - b":{"B":"BB"}, "default":{"C":"CC"}})(DummyTests)