correctly calculate _config
@@ -123,14 +123,21 @@ class Scaffold(object):
if self.fixture is not None:
return self.fixture
- self.fixture = copy(self.config)
- for sr_path, subrunner in self.subrunners.items():
- sub_fix = subrunner.get_fixture()
+ def get_fixture_recursive(runner):
+ for sr_path, subrunner in runner.subrunners.items():
+ # I am not sure if it is necessary to trigger all
+ subrunner.get_fixture()
+ get_fixture_recursive(subrunner)
+ sub_fix = copy(subrunner.config)
sub_path = sr_path
if is_prefix(self.path, sub_path):
sub_path = sr_path[len(self.path):].strip('.')
# Note: This might fail if we allow non-dict fixtures
set_by_dotted_path(self.fixture, sub_path, sub_fix)
+
+ self.fixture = copy(self.config)
+ get_fixture_recursive(self)
+
return self.fixture
def finalize_initialization(self, run):
