mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-19 19:10:17 +00:00
...
This commit is contained in:
parent
857eec66f1
commit
c1abf1b492
@ -46,7 +46,7 @@ int main(int argc, char** argv){
|
||||
std::filesystem::current_path(filepath.parent_path());
|
||||
|
||||
pkpy::PyObject* ret = nullptr;
|
||||
ret = vm->exec(src.c_str(), argv_1, pkpy::EXEC_MODE);
|
||||
ret = vm->exec(src.c_str(), filepath.filename().string(), pkpy::EXEC_MODE);
|
||||
pkpy_delete(vm);
|
||||
return ret != nullptr ? 0 : 1;
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
import test
|
||||
import test1
|
||||
|
||||
assert test.add(1, 2) == 13
|
||||
assert test1.add(1, 2) == 13
|
1
tests/test1/__init__.py
Normal file
1
tests/test1/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from ._a import add
|
4
tests/test1/_a.py
Normal file
4
tests/test1/_a.py
Normal file
@ -0,0 +1,4 @@
|
||||
from ._b import C
|
||||
|
||||
def add(a, b):
|
||||
return a + b + C
|
1
tests/test1/_b.py
Normal file
1
tests/test1/_b.py
Normal file
@ -0,0 +1 @@
|
||||
from test2 import D as C
|
Loading…
x
Reference in New Issue
Block a user