diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index d366040f..efb2f719 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -74,6 +74,7 @@ jobs: run: | DDDD=$(pwd) pytest ${DDDD}/tests/pytest + pytest ${DDDD}/apps - name: Dumb Smoke Test run: | diff --git a/Makefile b/Makefile index 0317010e..e151812b 100644 --- a/Makefile +++ b/Makefile @@ -137,7 +137,7 @@ test: .venv . .venv/bin/activate ; \ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude .venv,build,tmp,experiments ; . .venv/bin/activate ; \ - pytest tests/pytest + pytest tests/pytest apps mkdir -p tmp wget -O tmp/test.input.001.bin https://github.com/ceccopierangiolieugenio/binaryRepo/raw/master/pyTermTk/tests/test.input.001.bin wget -O tmp/test.input.002.bin https://github.com/ceccopierangiolieugenio/binaryRepo/raw/master/pyTermTk/tests/test.input.002.bin diff --git a/apps/ttkode/tests/conftest.py b/apps/ttkode/tests/conftest.py index 4c985200..610c0173 100644 --- a/apps/ttkode/tests/conftest.py +++ b/apps/ttkode/tests/conftest.py @@ -30,6 +30,21 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../../../libs/pyTerm # Add the ttkode package path sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) +# Reuse the pytest mocks used by the core test suite +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../../../tests/pytest')) + +from mock_term import Mock_TTkTerm +from mock_input import Mock_TTkInput + +moduleTerm = type(sys)('TermTk.TTkCore.drivers.term_unix_common') +moduleTerm._TTkTerm = Mock_TTkTerm + +moduleInput = type(sys)('TermTk.TTkCore.TTkTerm.input') +moduleInput.TTkInput = Mock_TTkInput + +sys.modules['TermTk.TTkCore.drivers.term_unix_common'] = moduleTerm +sys.modules['TermTk.TTkCore.TTkTerm.input'] = moduleInput + @pytest.fixture(autouse=True) def reset_plugin_instances(): """Reset plugin instances before each test to avoid state leakage.""" diff --git a/docs/requirements.txt b/docs/requirements.txt index b541384b..84bb20ef 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -5,7 +5,7 @@ backports.tarfile==1.2.0 beautifulsoup4==4.13.4 build==1.2.2.post1 certifi==2025.4.26 -cffi==1.17.1 +cffi charset-normalizer==3.4.2 cryptography==46.0.5 css-html-js-minify==2.5.5