diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 411cc87e7c..746dfa3aed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,7 +84,8 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install tox coverage[toml] + # See https://github.com/nedbat/coveragepy/issues/991 + python -m pip install tox coverage[toml]~=6.6.0b1 - name: Get packages uses: actions/download-artifact@v3 with: @@ -93,26 +94,21 @@ jobs: env: TOGA_INSTALL_COMMAND: 'bash -c "pip install ../{core,dummy}/dist/*.whl"' run: | + tox -e py-core cd core - tox -e py - mv .coverage.* .. + python -m coverage xml + mv .coverage .coverage.${{ matrix.platform }}.${{ matrix.python-version }} - name: Store coverage data uses: actions/upload-artifact@v3 with: name: core-coverage-data - path: ".coverage.*" - if-no-files-found: ignore - - name: Report platform coverage - run: | - python -m coverage combine - python -m coverage report - # Generate XML report for CodeCov - python -m coverage xml + path: "core/.coverage.*" + if-no-files-found: error - name: Upload coverage data to CodeCov uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} - file: ./coverage.xml + file: core/coverage.xml flags: unittests fail_ci_if_error: true @@ -130,29 +126,24 @@ jobs: python-version: ${{ env.max_python_version }} - name: Install dependencies run: | - python -m pip install coverage[toml] + # See https://github.com/nedbat/coveragepy/issues/991 + python -m pip install coverage[toml]~=6.6.0b1 - name: Retrieve coverage data uses: actions/download-artifact@v3 with: name: core-coverage-data - - name: Normalize paths in coverage data - run: | - # See https://github.com/nedbat/coveragepy/issues/991 - for coverage in `ls .coverage.*`; do - sqlite3 $coverage "update file set path = replace(path, '\\', '/')" - done - - name: Combine coverage - run: | - python -m coverage combine + path: core - name: Generate coverage report run: | + cd core + python -m coverage combine python -m coverage html --skip-covered --skip-empty - python -m coverage report # --fail-under=100 + python -m coverage report --rcfile ../pyproject.toml # --fail-under=100 - name: Upload HTML report if check failed. uses: actions/upload-artifact@v3 with: name: html-coverage-report - path: htmlcov + path: core/htmlcov if: ${{ failure() }} backend: @@ -193,61 +184,9 @@ jobs: - name: Install dependencies run: | ${{ matrix.pre-command }} - python -m pip install tox coverage[toml] + python -m pip install tox - name: Test env: TOGA_INSTALL_COMMAND: 'bash -c "pip install ../{core,dummy,${{ matrix.backend }}}/dist/*.whl"' run: | - cd ${{ matrix.backend }} - tox -e py - mv .coverage.* .. - - name: Store coverage data - uses: actions/upload-artifact@v3 - with: - name: backend-coverage-data - path: ".coverage.*" - if-no-files-found: ignore - - name: Report platform coverage - run: | - python -m coverage combine - python -m coverage report - - backend-coverage: - name: Combine & check backend coverage. - runs-on: ubuntu-latest - needs: - - backend - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: actions/setup-python@v4.3.0 - with: - # Use latest, so it understands all syntax. - python-version: ${{ env.max_python_version }} - - name: Install dependencies - run: | - python -m pip install coverage[toml] - - name: Retrieve coverage data - uses: actions/download-artifact@v3 - with: - name: backend-coverage-data - - name: Normalize paths in coverage data - run: | - # See https://github.com/nedbat/coveragepy/issues/991 - for coverage in `ls .coverage.*`; do - sqlite3 $coverage "update file set path = replace(path, '\\', '/')" - done - - name: Combine coverage - run: | - python -m coverage combine - - name: Generate coverage report - run: | - python -m coverage html --skip-covered --skip-empty - python -m coverage report # --fail-under=100 - - name: Upload HTML report if check failed. - uses: actions/upload-artifact@v3 - with: - name: html-coverage-report - path: htmlcov - if: ${{ failure() }} + tox -e py-${{ matrix.backend }} diff --git a/android/pyproject.toml b/android/pyproject.toml index b2b3b63080..b6b018aac3 100644 --- a/android/pyproject.toml +++ b/android/pyproject.toml @@ -6,21 +6,13 @@ build-backend = "setuptools.build_meta" parallel = true branch = true relative_files = true + +# See notes in the root pyproject.toml file. +source = ["src"] source_pkgs = ["toga_android"] [tool.coverage.paths] source = [ - "src", - "**/site-packages" -] - -[tool.coverage.report] -show_missing = true -skip_covered = true -skip_empty = true -precision = 1 -exclude_lines = [ - "pragma: no cover", - "@(abc\\.)?abstractmethod", - "NotImplementedError\\(\\)" + "src/toga_android", + "**/toga_android", ] diff --git a/android/tox.ini b/android/tox.ini deleted file mode 100644 index b62573ff33..0000000000 --- a/android/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# Tox (http://tox.testrun.org/) is a tool for running tests -# in multiple virtualenvs. This configuration file will run the -# test suite on all supported python versions. To use it, "pip install tox" -# and then run "tox" from this directory. - -[tox] -envlist = py{37,38,39,310,311,312} -skip_missing_interpreters = true - -[testenv] -skip_install = True -deps = - pytest - pytest-tldr - coverage -setenv = TOGA_BACKEND = toga_android -allowlist_externals = - bash -# TOGA_INSTALL_COMMAND is set to a bash command by the CI workflow. -commands = - {env:TOGA_INSTALL_COMMAND:pip install ../core ../dummy .} - python -m coverage run -m pytest -vv diff --git a/changes/1673.misc.rst b/changes/1673.misc.rst new file mode 100644 index 0000000000..64ea19c26a --- /dev/null +++ b/changes/1673.misc.rst @@ -0,0 +1 @@ +Corrected coverage path mapping. diff --git a/cocoa/pyproject.toml b/cocoa/pyproject.toml index 3e68bbbf75..45e68aa73f 100644 --- a/cocoa/pyproject.toml +++ b/cocoa/pyproject.toml @@ -6,21 +6,13 @@ build-backend = "setuptools.build_meta" parallel = true branch = true relative_files = true + +# See notes in the root pyproject.toml file. +source = ["src"] source_pkgs = ["toga_cocoa"] [tool.coverage.paths] source = [ - "src", - "**/site-packages" -] - -[tool.coverage.report] -show_missing = true -skip_covered = true -skip_empty = true -precision = 1 -exclude_lines = [ - "pragma: no cover", - "@(abc\\.)?abstractmethod", - "NotImplementedError\\(\\)" + "src/toga_cocoa", + "**/toga_cocoa", ] diff --git a/cocoa/tox.ini b/cocoa/tox.ini deleted file mode 100644 index cf9384a39f..0000000000 --- a/cocoa/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# Tox (http://tox.testrun.org/) is a tool for running tests -# in multiple virtualenvs. This configuration file will run the -# test suite on all supported python versions. To use it, "pip install tox" -# and then run "tox" from this directory. - -[tox] -envlist = py{37,38,39,310,311,312} -skip_missing_interpreters = true - -[testenv] -skip_install = True -deps = - pytest - pytest-tldr - coverage -setenv = TOGA_BACKEND = toga_cocoa -allowlist_externals = - bash -# TOGA_INSTALL_COMMAND is set to a bash command by the CI workflow. -commands = - {env:TOGA_INSTALL_COMMAND:pip install ../core ../dummy .} - python -m coverage run -m pytest -vv diff --git a/core/pyproject.toml b/core/pyproject.toml index 4a8eda76ab..ff12ce7437 100644 --- a/core/pyproject.toml +++ b/core/pyproject.toml @@ -6,21 +6,13 @@ build-backend = "setuptools.build_meta" parallel = true branch = true relative_files = true -source_pkgs = ["toga", "toga_dummy"] + +# See notes in the root pyproject.toml file. +source = ["src"] +source_pkgs = ["toga"] [tool.coverage.paths] source = [ - "src", - "**/site-packages" -] - -[tool.coverage.report] -show_missing = true -skip_covered = true -skip_empty = true -precision = 1 -exclude_lines = [ - "pragma: no cover", - "@(abc\\.)?abstractmethod", - "NotImplementedError\\(\\)" + "src/toga", + "**/toga", ] diff --git a/core/tox.ini b/core/tox.ini deleted file mode 100644 index 81b085abc3..0000000000 --- a/core/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# Tox (http://tox.testrun.org/) is a tool for running tests -# in multiple virtualenvs. This configuration file will run the -# test suite on all supported python versions. To use it, "pip install tox" -# and then run "tox" from this directory. - -[tox] -envlist = py{37,38,39,310,311,312} -skip_missing_interpreters = true - -[testenv] -skip_install = True -deps = - pytest - pytest-tldr - coverage -setenv = TOGA_BACKEND = toga_dummy -allowlist_externals = - bash -# TOGA_INSTALL_COMMAND is set to a bash command by the CI workflow. -commands = - {env:TOGA_INSTALL_COMMAND:pip install . ../dummy} - python -m coverage run -m pytest -vv diff --git a/docs/how-to/contribute-code.rst b/docs/how-to/contribute-code.rst index cbb429ed64..2d00d11ed4 100644 --- a/docs/how-to/contribute-code.rst +++ b/docs/how-to/contribute-code.rst @@ -362,39 +362,19 @@ Start by running the core test suite: .. code-block:: bash - (venv) $ cd core - (venv) $ TOGA_BACKEND=toga_dummy python setup.py test - ... - ---------------------------------------------------------------------- - Ran 181 tests in 0.343s - - OK (skipped=1) + (venv) $ tox -e py-core .. group-tab:: Linux .. code-block:: bash - (venv) $ cd core - (venv) $ TOGA_BACKEND=toga_dummy python setup.py test - ... - ---------------------------------------------------------------------- - Ran 181 tests in 0.343s - - OK (skipped=1) + (venv) $ tox -e py-core .. group-tab:: Windows .. code-block:: doscon - (venv) C:\...>cd core - (venv) C:\...>set TOGA_BACKEND=toga_dummy - (venv) C:\...>python setup.py test - (venv) C:\...>set TOGA_BACKEND= - ... - ---------------------------------------------------------------------- - Ran 181 tests in 0.343s - - OK (skipped=1) + (venv) C:\...>tox -e py-core You should get some output indicating that tests have been run. You shouldn't ever get any FAIL or ERROR test results. We run our full test suite before @@ -403,14 +383,6 @@ the patch. If you do find a test error or failure, either there's something odd in your test environment, or you've found an edge case that we haven't seen before - either way, let us know! -Note that when we run the test suite, we set the environment variable -``TOGA_BACKEND``. Under normal operation, Toga will automatically choose the -appropriate backend for your platform. However, when running the tests for -the core platform, we need to use a special "dummy" backend. This dummy backend -satisfies the interface contract of a Toga backend, but doesn't acutally -display any widgets. This allows us to test the behavior of the core library -independent of the behavior of a specific backend. - Although the tests should all pass, the test suite itself is still incomplete. There are many aspects of the Toga Core API that aren't currently tested (or aren't tested thoroughly). To work out what *isn't* tested, we're @@ -419,53 +391,9 @@ going to use a tool called `coverage check which lines of code have (and haven't) been executed - which then gives you an idea of what code has (and hasn't) been tested. -Install coverage, and then re-run the test suite -- this time, in a slightly -different way so that we can gather some data about the test run. Then we can -ask coverage to generate a report of the data that was gathered: - -.. tabs:: - - .. group-tab:: macOS - - .. code-block:: bash - - (venv) $ pip install coverage - (venv) $ TOGA_BACKEND=toga_dummy coverage run setup.py test - (venv) $ coverage report -m --include="toga/*" - Name Stmts Miss Cover Missing - ------------------------------------------------------------------ - toga/__init__.py 29 0 100% - toga/app.py 50 0 100% - ... - toga/window.py 79 18 77% 58, 75, 87, 92, 104, 141, 155, 164, 168, 172-173, 176, 192, 204, 216, 228, 243, 257 - ------------------------------------------------------------------ - TOTAL 1034 258 75% - - .. group-tab:: Linux - - .. code-block:: bash - - (venv) $ pip install coverage - (venv) $ TOGA_BACKEND=toga_dummy coverage run setup.py test - (venv) $ coverage report -m --include="toga/*" - Name Stmts Miss Cover Missing - ------------------------------------------------------------------ - toga/__init__.py 29 0 100% - toga/app.py 50 0 100% - ... - toga/window.py 79 18 77% 58, 75, 87, 92, 104, 141, 155, 164, 168, 172-173, 176, 192, 204, 216, 228, 243, 257 - ------------------------------------------------------------------ - TOTAL 1034 258 75% - - .. group-tab:: Windows - - .. code-block:: doscon +At the end of the test output there should be a report of the coverage data that +was gathered:: - (venv) C:\...>pip install coverage - (venv) C:\...>set TOGA_BACKEND=toga_dummy - (venv) C:\...>coverage run setup.py test - (venv) C:\...>set TOGA_BACKEND= - (venv) C:\...>coverage report -m --include=toga/* Name Stmts Miss Cover Missing ------------------------------------------------------------------ toga/__init__.py 29 0 100% @@ -491,22 +419,8 @@ Your task: create a test that improves coverage - even by one more line. Once you've written a test, re-run the test suite to generate fresh coverage data. Let's say we added a test for line 58 of ``toga/window.py`` - we'd -expect to see something like: +expect to see something like:: -.. tabs:: - - .. group-tab:: macOS - - .. code-block:: bash - - (venv) $ TOGA_BACKEND=toga_dummy coverage run setup.py test - running test - ... - ---------------------------------------------------------------------- - Ran 101 tests in 0.343s - - OK (skipped=1) - (venv) $ coverage report -m --include="toga/*" Name Stmts Miss Cover Missing ------------------------------------------------------------------ toga/__init__.py 29 0 100% @@ -516,51 +430,6 @@ expect to see something like: ------------------------------------------------------------------ TOTAL 1034 257 75% - .. group-tab:: Linux - - .. code-block:: bash - - (venv) $ TOGA_BACKEND=toga_dummy coverage run setup.py test - running test - ... - ---------------------------------------------------------------------- - Ran 101 tests in 0.343s - - OK (skipped=1) - (venv) $ coverage report -m --include="toga/*" - Name Stmts Miss Cover Missing - ------------------------------------------------------------------ - toga/__init__.py 29 0 100% - toga/app.py 50 0 100% - ... - toga/window.py 79 17 78% 75, 87, 92, 104, 141, 155, 164, 168, 172-173, 176, 192, 204, 216, 228, 243, 257 - ------------------------------------------------------------------ - TOTAL 1034 257 75% - - .. group-tab:: Windows - - .. code-block:: doscon - - (venv) C:\...>set TOGA_BACKEND=toga_dummy - (venv) C:\...>coverage run setup.py test - (venv) C:\...>set TOGA_BACKEND= - running test - ... - ---------------------------------------------------------------------- - Ran 101 tests in 0.343s - - OK (skipped=1) - (venv) $ coverage report -m --include=toga/* - Name Stmts Miss Cover Missing - ------------------------------------------------------------------ - toga/__init__.py 29 0 100% - toga/app.py 50 0 100% - ... - toga/window.py 79 17 78% 75, 87, 92, 104, 141, 155, 164, 168, 172-173, 176, 192, 204, 216, 228, 243, 257 - ------------------------------------------------------------------ - TOTAL 1034 257 75% - - That is, one more test has been executed, resulting in one less missing line in the coverage results. diff --git a/gtk/pyproject.toml b/gtk/pyproject.toml index fc7d2a60f4..51e3e34788 100644 --- a/gtk/pyproject.toml +++ b/gtk/pyproject.toml @@ -6,21 +6,13 @@ build-backend = "setuptools.build_meta" parallel = true branch = true relative_files = true + +# See notes in the root pyproject.toml file. +source = ["src"] source_pkgs = ["toga_gtk"] [tool.coverage.paths] source = [ - "src", - "**/site-packages" -] - -[tool.coverage.report] -show_missing = true -skip_covered = true -skip_empty = true -precision = 1 -exclude_lines = [ - "pragma: no cover", - "@(abc\\.)?abstractmethod", - "NotImplementedError\\(\\)" + "src/toga_gtk", + "**/toga_gtk", ] diff --git a/gtk/tox.ini b/gtk/tox.ini deleted file mode 100644 index 67eab7e6e8..0000000000 --- a/gtk/tox.ini +++ /dev/null @@ -1,23 +0,0 @@ -# Tox (http://tox.testrun.org/) is a tool for running tests -# in multiple virtualenvs. This configuration file will run the -# test suite on all supported python versions. To use it, "pip install tox" -# and then run "tox" from this directory. - -[tox] -envlist = py{37,38,39,310,311,312} -skip_missing_interpreters = true - -[testenv] -skip_install = True -deps = - pytest - pytest-tldr - coverage -setenv = TOGA_BACKEND = toga_gtk -allowlist_externals = - bash - xvfb-run -# TOGA_INSTALL_COMMAND is set to a bash command by the CI workflow. -commands = - {env:TOGA_INSTALL_COMMAND:pip install ../core ../dummy .} - xvfb-run -a -s '-screen 0 2048x1536x24' python -m coverage run -m pytest -vv diff --git a/iOS/pyproject.toml b/iOS/pyproject.toml index 836b0bb1ca..3d5244464d 100644 --- a/iOS/pyproject.toml +++ b/iOS/pyproject.toml @@ -6,21 +6,13 @@ build-backend = "setuptools.build_meta" parallel = true branch = true relative_files = true + +# See notes in the root pyproject.toml file. +source = ["src"] source_pkgs = ["toga_iOS"] [tool.coverage.paths] source = [ - "src", - "**/site-packages" -] - -[tool.coverage.report] -show_missing = true -skip_covered = true -skip_empty = true -precision = 1 -exclude_lines = [ - "pragma: no cover", - "@(abc\\.)?abstractmethod", - "NotImplementedError\\(\\)" + "src/toga_iOS", + "**/toga_iOS", ] diff --git a/iOS/tox.ini b/iOS/tox.ini deleted file mode 100644 index 8a0d23ea3a..0000000000 --- a/iOS/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# Tox (http://tox.testrun.org/) is a tool for running tests -# in multiple virtualenvs. This configuration file will run the -# test suite on all supported python versions. To use it, "pip install tox" -# and then run "tox" from this directory. - -[tox] -envlist = py{37,38,39,310,311,312} -skip_missing_interpreters = true - -[testenv] -skip_install = True -deps = - pytest - pytest-tldr - coverage -setenv = TOGA_BACKEND = toga_iOS -allowlist_externals = - bash -# TOGA_INSTALL_COMMAND is set to a bash command by the CI workflow. -commands = - {env:TOGA_INSTALL_COMMAND:pip install ../core ../dummy .} - python -m coverage run -m pytest -vv diff --git a/pyproject.toml b/pyproject.toml index 20990d16aa..90f22ecd40 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,59 +1,17 @@ +# The coverage settings in this file only control `coverage report`. `coverage run` and +# `coverage combine` are controlled by the pyproject.toml files in each package's +# subdirectory. +# +# In each subdirectory's pyproject.toml, we use both of the following settings: +# * `source_pkgs`: detects the given packages no matter where they're imported from. +# * `source`: detects all files in the given directory, including files that are +# never imported by the tests. +# +# When running through `tox`, this will produce duplicate entries which must be merged +# with `coverage combine`. + [tool.coverage.run] -parallel = true -branch = true relative_files = true -source = [ - "android", - "cocoa", - "core", - "dummy", - "gtk", - "iOS", - "web", - "winforms", -] - -[tool.coverage.paths] -android = [ - "android/src/toga_android", - "src/toga_android", - "**/site-packages/toga_android", -] -cocoa = [ - "cocoa/src/toga_cocoa", - "src/toga_cocoa", - "**/site-packages/toga_cocoa", -] -core = [ - "core/src/toga", - "src/toga", - "**/site-packages/toga", -] -dummy = [ - "dummy/src/toga_dummy", - "src/toga_dummy", - "**/site-packages/toga_dummy", -] -gtk = [ - "gtk/src/toga_gtk", - "src/toga_gtk", - "**/site-packages/toga_gtk", -] -iOS = [ - "iOS/src/toga_iOS", - "src/toga_iOS", - "**/site-packages/toga_iOS", -] -web = [ - "web/src/toga_web", - "src/toga_web", - "**/site-packages/toga_web", -] -winforms = [ - "winforms/src/toga_winforms", - "src/toga_winforms", - "**/site-packages/toga_winforms", -] [tool.coverage.report] show_missing = true diff --git a/tox.ini b/tox.ini index ca97c09a6d..a3da155e0d 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,33 @@ -# Tox (http://tox.testrun.org/) is a tool for running tests -# in multiple virtualenvs. This configuration file will run the -# test suite on all supported python versions. To use it, "pip install tox" -# and then run "tox" from this directory. +# The leading comma generates the "py-..." environments. +[testenv:py{,37,38,39,310,311,312}-{android,cocoa,core,gtk,iOS,web,winforms}] +skip_install = True +deps = + pytest + pytest-tldr + # See https://github.com/nedbat/coveragepy/issues/991 + coverage[toml]~=6.6.0b1 +setenv = + android: subdir = android + cocoa: subdir = cocoa + core: subdir = core + gtk: subdir = gtk + iOS: subdir = iOS + web: subdir = web + winforms: subdir = winforms -[tox] -envlist = towncrier-check,docs,package -skip_missing_interpreters = true + core: TOGA_BACKEND = toga_dummy + !core: TOGA_BACKEND = toga_{env:subdir} + gtk: test_command_prefix = xvfb-run -a -s "-screen 0 2048x1536x24" +changedir = {env:subdir} +allowlist_externals = + bash + gtk: xvfb-run +commands = + # TOGA_INSTALL_COMMAND is set to a bash command by the CI workflow. + {env:TOGA_INSTALL_COMMAND:pip install . ../core ../dummy} + {env:test_command_prefix:} coverage run -m pytest -vv + coverage combine + coverage report --rcfile ../pyproject.toml [testenv:towncrier-check] skip_install = True diff --git a/web/pyproject.toml b/web/pyproject.toml index a8da535969..911406014c 100644 --- a/web/pyproject.toml +++ b/web/pyproject.toml @@ -6,21 +6,13 @@ build-backend = "setuptools.build_meta" parallel = true branch = true relative_files = true + +# See notes in the root pyproject.toml file. +source = ["src"] source_pkgs = ["toga_web"] [tool.coverage.paths] source = [ - "src", - "**/site-packages" -] - -[tool.coverage.report] -show_missing = true -skip_covered = true -skip_empty = true -precision = 1 -exclude_lines = [ - "pragma: no cover", - "@(abc\\.)?abstractmethod", - "NotImplementedError\\(\\)" + "src/toga_web", + "**/toga_web", ] diff --git a/web/tox.ini b/web/tox.ini deleted file mode 100644 index 0061c598e7..0000000000 --- a/web/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# Tox (http://tox.testrun.org/) is a tool for running tests -# in multiple virtualenvs. This configuration file will run the -# test suite on all supported python versions. To use it, "pip install tox" -# and then run "tox" from this directory. - -[tox] -envlist = py{37,38,39,310,311,312} -skip_missing_interpreters = true - -[testenv] -skip_install = True -deps = - pytest - pytest-tldr - coverage -setenv = TOGA_BACKEND = toga_web -allowlist_externals = - bash -# TOGA_INSTALL_COMMAND is set to a bash command by the CI workflow. -commands = - {env:TOGA_INSTALL_COMMAND:pip install ../core ../dummy .} - python -m coverage run -m pytest -vv diff --git a/winforms/pyproject.toml b/winforms/pyproject.toml index 8c0e295804..16281bcf4d 100644 --- a/winforms/pyproject.toml +++ b/winforms/pyproject.toml @@ -6,21 +6,13 @@ build-backend = "setuptools.build_meta" parallel = true branch = true relative_files = true + +# See notes in the root pyproject.toml file. +source = ["src"] source_pkgs = ["toga_winforms"] [tool.coverage.paths] source = [ - "src", - "**/site-packages" -] - -[tool.coverage.report] -show_missing = true -skip_covered = true -skip_empty = true -precision = 1 -exclude_lines = [ - "pragma: no cover", - "@(abc\\.)?abstractmethod", - "NotImplementedError\\(\\)" + "src/toga_winforms", + "**/toga_winforms", ] diff --git a/winforms/tox.ini b/winforms/tox.ini deleted file mode 100644 index 2d3b5b6d57..0000000000 --- a/winforms/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# Tox (http://tox.testrun.org/) is a tool for running tests -# in multiple virtualenvs. This configuration file will run the -# test suite on all supported python versions. To use it, "pip install tox" -# and then run "tox" from this directory. - -[tox] -envlist = py{37,38,39,310,311,312} -skip_missing_interpreters = true - -[testenv] -skip_install = True -deps = - pytest - pytest-tldr - coverage -setenv = TOGA_BACKEND = toga_winforms -allowlist_externals = - bash -# TOGA_INSTALL_COMMAND is set to a bash command by the CI workflow. -commands = - {env:TOGA_INSTALL_COMMAND:pip install ../core ../dummy .} - python -m coverage run -m pytest -vv