Skip to content

Add pytests for the Lua-Python interface#97

Closed
cclauss wants to merge 1 commit into
bastibe:masterfrom
cclauss:patch-5
Closed

Add pytests for the Lua-Python interface#97
cclauss wants to merge 1 commit into
bastibe:masterfrom
cclauss:patch-5

Conversation

@cclauss

@cclauss cclauss commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

As requested in:

% pytest tests/test_lua_via_pytest.py

============================= test session starts ==============================
platform linux -- Python 3.14.6, pytest-9.1.0, pluggy-1.6.0
rootdir: /home/runner/work/lunatic-python/lunatic-python
collected 7 items

tests/test_lua_via_pytest.py ...ssss                                     [100%]

========================= 3 passed, 4 skipped in 0.02s =========================
# TODO: Remove this skip marker and fix the segmentation fault issues.
skip_segfault = pytest.mark.skip(
    reason="Segmentation fault in LuaJIT when accessing table elements"
)

% `pytest tests/test_lua_via_pytest.py`
```
============================= test session starts ==============================
platform linux -- Python 3.14.6, pytest-9.1.0, pluggy-1.6.0
rootdir: /home/runner/work/lunatic-python/lunatic-python
collected 7 items

tests/test_lua_via_pytest.py ...ssss                                     [100%]

========================= 3 passed, 4 skipped in 0.02s =========================
```
```python
# TODO: Remove this skip marker and fix the segmentation fault issues.
skip_segfault = pytest.mark.skip(
    reason="Segmentation fault in LuaJIT when accessing table elements"
)
```
@leso-kn

leso-kn commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

As requested in:

Not exactly :) I assume you are referring to #94 (comment), where I asked whether we can call the existing tests inside the tests/ folder.

This PR rewrites a small amount of tests for pytest.

Please note that lunatic-python already uses the doctest library.

I will close this issue as invoking python tests/test_lua.py should be sufficient to implement the Github Actions pipeline.

@leso-kn leso-kn closed this Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants