Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

0.2.1: pytest is sometimes failing when pytest-randomly is installed #65

Open
kloczek opened this issue Aug 24, 2021 · 0 comments
Open

Comments

@kloczek
Copy link

kloczek commented Aug 24, 2021

Looks like there are some test units order dependecies and ~2-3 out of 10 tries fails usually with:

+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.11, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
Using --randomly-seed=2348392663
rootdir: /home/tkloczko/rpmbuild/BUILD/m2r-0.2.1
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, aspectlib-1.5.2, toolbox-0.5, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, pyfakefs-4.5.0, flaky-3.7.0, benchmark-3.4.1, xdist-2.3.0, pylama-7.7.1, datadir-1.3.1, regressions-2.2.0, cases-3.6.3, xprocess-0.18.1, black-0.3.12, anyio-3.3.0, Faker-8.11.0, asyncio-0.15.1, trio-0.7.0, httpbin-1.0.0, subtests-0.5.0, isort-2.0.0, hypothesis-6.14.6, mock-3.6.1, profiling-1.7.0, randomly-3.8.0, checkdocs-2.7.1
collected 86 items

tests/test_cli.py ......                                                                                                                                             [  6%]
. .                                                                                                                                                                  [  8%]
tests/test_cli.py ...                                                                                                                                                [ 11%]
tests/test_renderer.py ...........s.........................F......................................                                                                  [100%]

================================================================================= FAILURES =================================================================================
___________________________________________________________________ TestInlineMarkdown.test_inline_math ____________________________________________________________________

self = <tests.test_renderer.TestInlineMarkdown testMethod=test_inline_math>

    def test_inline_math(self):
        src = 'this is `$E = mc^2$` inline math.'
        out = self.conv(src)
>       self.assertEqual(out, '\nthis is :math:`E = mc^2` inline math.\n')
E       AssertionError: '\nthis is ``$E = mc^2$`` inline math.\n' != '\nthis is :math:`E = mc^2` inline math.\n'
E
E       - this is ``$E = mc^2$`` inline math.
E       ?          --        - -
E       + this is :math:`E = mc^2` inline math.
E       ?         ++++++

tests/test_renderer.py:292: AssertionError
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_renderer.py:323: markdown does not support dedent in block quote
FAILED tests/test_renderer.py::TestInlineMarkdown::test_inline_math - AssertionError: '\nthis is ``$E = mc^2$`` inline math.\n' != '\nthis is :math:`E = mc^2` inline mat...
================================================================= 1 failed, 84 passed, 1 skipped in 7.98s ==================================================================
pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo(<pr

Workaround: run pytest -p no:randomly
To diagnose this issue can be used https://github.com/mrbean-bremen/pytest-find-dependencies/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant