diff --git a/src2/main.cpp b/src2/main.cpp index 4db501a8..7830c97c 100644 --- a/src2/main.cpp +++ b/src2/main.cpp @@ -99,9 +99,6 @@ int main(int argc, char** argv){ std::string src((std::istreambuf_iterator(file)), std::istreambuf_iterator()); file.close(); - // set parent path as cwd - std::filesystem::current_path(filepath.parent_path()); - bool ok = pkpy_exec_2(vm, src.c_str(), filepath.filename().string().c_str(), 0, NULL); if(!ok) pkpy_clear_error(vm, NULL); pkpy_delete_vm(vm); diff --git a/tests/30_import.py b/tests/30_import.py index a4ca7b3a..e5a7d4fa 100644 --- a/tests/30_import.py +++ b/tests/30_import.py @@ -3,6 +3,9 @@ try: except ImportError: exit(0) +# test import +os.chdir('tests') + import test1 assert test1.add(1, 2) == 13