| |
@@ -161,9 +161,10 @@
|
| |
|
| |
config_opts = {}
|
| |
with open(path) as f:
|
| |
- config = [line for line in f.readlines() if
|
| |
- line.find("config_opts['root']") >= 0]
|
| |
- exec config[0] # pylint: disable=W0122
|
| |
+ content = f.read()
|
| |
+ content = re.sub(r'include\((.*)\)', r'exec(open(\g<1>).read(), {}, locals())', content)
|
| |
+ config = compile(content, path, 'exec')
|
| |
+ exec(config)
|
| |
self.mock_root = config_opts['root']
|
| |
if Settings.uniqueext:
|
| |
self.mock_root += Settings.uniqueext
|
| |