Commit b0f6f674 authored by Denis Bilenko's avatar Denis Bilenko

helper.py: fix run() to accept assets

parent 38c3a65c
...@@ -89,9 +89,8 @@ def prepare_stdlib_test(filename, assets=None): ...@@ -89,9 +89,8 @@ def prepare_stdlib_test(filename, assets=None):
return module_code return module_code
def copy_assets(source, assets): def copy_assets(directory, assets):
if assets: if assets:
directory = os.path.dirname(filename)
cwd = os.getcwd() cwd = os.getcwd()
os.chdir(directory) os.chdir(directory)
try: try:
...@@ -104,4 +103,4 @@ def copy_assets(source, assets): ...@@ -104,4 +103,4 @@ def copy_assets(source, assets):
def run(filename, d, assets=None): def run(filename, d, assets=None):
exec prepare_stdlib_test(filename) in d exec prepare_stdlib_test(filename, assets) in d
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment