testing-cabal / testtools

Testtools - tasteful testing for python
https://testtools.readthedocs.io/en/latest/
Other
94 stars 88 forks source link

GitHub Action to run pytest #359

Closed cclauss closed 3 weeks ago

cclauss commented 10 months ago

Related to

Some contributors care about pytest and others do not.

This GitHub Action allows contributors to see which tests pass and which ones fail. They can use this visibility to propose fixes to reduce the 10 --ignored files. There are currently only 35 tests that fail.

pip install pytest testscenarios # Not updated since 2015

pytest --ignore=testtools/tests/matchers/test_basic.py \
       --ignore=testtools/tests/matchers/test_const.py \
       --ignore=testtools/tests/matchers/test_datastructures.py \
       --ignore=testtools/tests/matchers/test_dict.py \
       --ignore=testtools/tests/matchers/test_doctest.py \
       --ignore=testtools/tests/matchers/test_exception.py \
       --ignore=testtools/tests/matchers/test_higherorder.py \
       --ignore=testtools/tests/matchers/test_warnings.py \
       --ignore=testtools/tests/test_testcase.py \
       --ignore=testtools/tests/test_testresult.py .

============================= test session starts ==============================
platform linux -- Python 3.11.6, pytest-7.4.2, pluggy-1.3.0
rootdir: /home/runner/work/testtools/testtools
collected 308 items

testtools/tests/test_assert_that.py .............                        [  4%]
testtools/tests/test_compat.py .....................                     [ 11%]
testtools/tests/test_content.py ......................................   [ 23%]
testtools/tests/test_content_type.py .........                           [ 26%]
testtools/tests/test_distutilscmd.py ...                                 [ 27%]
testtools/tests/test_fixturesupport.py ........                          [ 29%]
testtools/tests/test_helpers.py ...                                      [ 30%]
testtools/tests/test_monkey.py ..............                            [ 35%]
testtools/tests/test_run.py .s..........                                 [ 39%]
testtools/tests/test_runtest.py ........................                 [ 47%]
testtools/tests/test_tags.py ..........                                  [ 50%]
testtools/tests/test_testsuite.py .................                      [ 55%]
testtools/tests/test_with_with.py ..........                             [ 59%]
testtools/tests/matchers/test_filesystem.py ............................ [ 68%]
                                                                         [ 68%]
testtools/tests/matchers/test_impl.py ...........                        [ 71%]
testtools/tests/twistedsupport/test_deferred.py sss.                     [ 73%]
testtools/tests/twistedsupport/test_matchers.py sssssssssssss.           [ 77%]
testtools/tests/twistedsupport/test_runtest.py sssssssssssssssssssssssss [ 85%]
ssssssssssssssss.                                                        [ 91%]
testtools/tests/twistedsupport/test_spinner.py sssssssssssssssssssssssss [ 99%]
s.                                                                       [100%]

================= 224 passed, 84 skipped, 27 warnings in 1.45s =================