Skip to content

Commit 26265fb

Browse files
committed
feat: Added support for running tests in wasmer runtime
1 parent 5635c1b commit 26265fb

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ dependencies = [
4949
"python-dateutil",
5050
"psycopg",
5151
"psycopg_pool",
52+
"pytest",
5253
"pytz",
5354
"PyYAML",
5455
"svgwrite",

wasmer-requirements.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ charset-normalizer==3.4.3
2424
# wasmer-build-scripts (pyproject.toml)
2525
# requests
2626
colorama==0.4.6 ; sys_platform == 'win32'
27-
# via qrcode
27+
# via
28+
# pytest
29+
# qrcode
2830
cryptography==45.0.4
2931
# via
3032
# wasmer-build-scripts (pyproject.toml)
@@ -35,6 +37,8 @@ idna==3.10
3537
# via
3638
# wasmer-build-scripts (pyproject.toml)
3739
# requests
40+
iniconfig==2.1.0
41+
# via pytest
3842
jiter==0.10.0
3943
# via wasmer-build-scripts (pyproject.toml)
4044
lxml==6.0.0
@@ -52,16 +56,22 @@ numpy==2.3.2
5256
# shapely
5357
orjson==3.11.0
5458
# via wasmer-build-scripts (pyproject.toml)
59+
packaging==25.0
60+
# via pytest
5561
pandas==2.3.2
5662
# via wasmer-build-scripts (pyproject.toml)
5763
pillow==11.3.0
5864
# via wasmer-build-scripts (pyproject.toml)
65+
pluggy==1.6.0
66+
# via pytest
5967
protobuf==6.31.1
6068
# via wasmer-build-scripts (pyproject.toml)
6169
psycopg==3.2.9
6270
# via wasmer-build-scripts (pyproject.toml)
6371
psycopg-binary==3.2.9 ; implementation_name != 'pypy'
6472
# via psycopg
73+
psycopg-pool==3.2.6
74+
# via wasmer-build-scripts (pyproject.toml)
6575
pycparser==2.22
6676
# via
6777
# wasmer-build-scripts (pyproject.toml)
@@ -74,6 +84,8 @@ pydantic==2.11.7
7484
# via wasmer-build-scripts (pyproject.toml)
7585
pydantic-core==2.33.2
7686
# via pydantic
87+
pygments==2.19.2
88+
# via pytest
7789
pynacl==1.5.0
7890
# via wasmer-build-scripts (pyproject.toml)
7991
pyopenssl==25.1.0
@@ -82,6 +94,8 @@ pypandoc==1.15
8294
# via wasmer-build-scripts (pyproject.toml)
8395
pypng==0.20250521.0
8496
# via wasmer-build-scripts (pyproject.toml)
97+
pytest==8.4.2
98+
# via wasmer-build-scripts (pyproject.toml)
8599
python-dateutil==2.9.0
86100
# via
87101
# wasmer-build-scripts (pyproject.toml)
@@ -119,6 +133,7 @@ tiktoken==0.9.0
119133
typing-extensions==4.14.1
120134
# via
121135
# wasmer-build-scripts (pyproject.toml)
136+
# psycopg-pool
122137
# pydantic
123138
# pydantic-core
124139
# typing-inspection

wasmer.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ version = "0.1.1"
66
"wasmer/python-native" = "=0.1.3"
77

88
[fs]
9-
"/app" = "./src"
9+
"/tests" = "./tests"
1010
"/cpython/lib/python3.13/site-packages" = "./wasix-site-packages"
1111

1212
[[command]]
@@ -15,5 +15,5 @@ module = "wasmer/python-native:python"
1515
runner = "wasi"
1616

1717
[command.annotations.wasi]
18-
main-args = ["/app/main.py"]
18+
main-args = ["-m", "pytest"]
1919
env = ["PYTHONEXECUTABLE=/bin/python", "PYTHONHOME=/cpython", "HOME=/app"]

0 commit comments

Comments
 (0)