+ /usr/bin/python3 -Bm pytest -ra -p no:randomly
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /home/tkloczko/rpmbuild/BUILD/pytest-randomly-3.8.0
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, cases-3.4.6, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, flaky-3.7.0, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, hypothesis-6.13.7, Faker-8.4.0, cov-2.12.1
collected 37 items
. . [ 2%]
tests/test_pytest_randomly.py .........FFFFFFF.F................ [100%]
================================================================================= FAILURES =================================================================================
___________________________________________________________________________ test_files_reordered ___________________________________________________________________________
ourtestdir = <Testdir local('/tmp/pytest-of-tkloczko/pytest-18/test_files_reordered0')>
def test_files_reordered(ourtestdir):
code = """
def test_it():
pass
"""
ourtestdir.makepyfile(test_a=code, test_b=code, test_c=code, test_d=code)
args = ["-v", "--randomly-seed=15"]
out = ourtestdir.runpytest(*args)
out.assert_outcomes(passed=4, failed=0)
> assert out.outlines[8:12] == [
"test_d.py::test_it PASSED",
"test_c.py::test_it PASSED",
"test_a.py::test_it PASSED",
"test_b.py::test_it PASSED",
]
E AssertionError: assert ['', 'test_d....st_it PASSED'] == ['test_d.py::...st_it PASSED']
E At index 0 diff: '' != 'test_d.py::test_it PASSED'
E Use -v to get the full diff
/home/tkloczko/rpmbuild/BUILD/pytest-randomly-3.8.0/tests/test_pytest_randomly.py:241: AssertionError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
============================= test session starts ==============================
platform linux -- Python 3.8.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
Using --randomly-seed=15
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/tkloczko/rpmbuild/BUILD/pytest-randomly-3.8.0/.hypothesis/examples')
rootdir: /tmp/pytest-of-tkloczko/pytest-18/test_files_reordered0, configfile: pytest.ini
plugins: randomly-3.8.0, forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, cases-3.4.6, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, flaky-3.7.0, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, hypothesis-6.13.7, Faker-8.4.0, cov-2.12.1
collecting ... collected 4 items
test_d.py::test_it PASSED
test_c.py::test_it PASSED
test_a.py::test_it PASSED
test_b.py::test_it PASSED
============================== 4 passed in 0.11s ===============================
_________________________________________________________________ test_files_reordered_when_seed_not_reset _________________________________________________________________
ourtestdir = <Testdir local('/tmp/pytest-of-tkloczko/pytest-18/test_files_reordered_when_seed_not_reset0')>
def test_files_reordered_when_seed_not_reset(ourtestdir):
code = """
def test_it():
pass
"""
ourtestdir.makepyfile(test_a=code, test_b=code, test_c=code, test_d=code)
args = ["-v", "--randomly-seed=15"]
args.append("--randomly-dont-reset-seed")
out = ourtestdir.runpytest(*args)
out.assert_outcomes(passed=4, failed=0)
> assert out.outlines[8:12] == [
"test_d.py::test_it PASSED",
"test_c.py::test_it PASSED",
"test_a.py::test_it PASSED",
"test_b.py::test_it PASSED",
]
E AssertionError: assert ['', 'test_d....st_it PASSED'] == ['test_d.py::...st_it PASSED']
E At index 0 diff: '' != 'test_d.py::test_it PASSED'
E Use -v to get the full diff
/home/tkloczko/rpmbuild/BUILD/pytest-randomly-3.8.0/tests/test_pytest_randomly.py:261: AssertionError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
============================= test session starts ==============================
platform linux -- Python 3.8.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
Using --randomly-seed=15
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/tkloczko/rpmbuild/BUILD/pytest-randomly-3.8.0/.hypothesis/examples')
rootdir: /tmp/pytest-of-tkloczko/pytest-18/test_files_reordered_when_seed_not_reset0, configfile: pytest.ini
plugins: randomly-3.8.0, forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, cases-3.4.6, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, flaky-3.7.0, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, hypothesis-6.13.7, Faker-8.4.0, cov-2.12.1
collecting ... collected 4 items
test_d.py::test_it PASSED
test_c.py::test_it PASSED
test_a.py::test_it PASSED
test_b.py::test_it PASSED
============================== 4 passed in 0.11s ===============================
__________________________________________________________________________ test_classes_reordered __________________________________________________________________________
ourtestdir = <Testdir local('/tmp/pytest-of-tkloczko/pytest-18/test_classes_reordered0')>
def test_classes_reordered(ourtestdir):
ourtestdir.makepyfile(
test_one="""
from unittest import TestCase
class A(TestCase):
def test_a(self):
pass
class B(TestCase):
def test_b(self):
pass
class C(TestCase):
def test_c(self):
pass
class D(TestCase):
def test_d(self):
pass
"""
)
args = ["-v", "--randomly-seed=15"]
out = ourtestdir.runpytest(*args)
out.assert_outcomes(passed=4, failed=0)
> assert out.outlines[8:12] == [
"test_one.py::D::test_d PASSED",
"test_one.py::C::test_c PASSED",
"test_one.py::A::test_a PASSED",
"test_one.py::B::test_b PASSED",
]
E AssertionError: assert ['', 'test_on...est_a PASSED'] == ['test_one.py...est_b PASSED']
E At index 0 diff: '' != 'test_one.py::D::test_d PASSED'
E Use -v to get the full diff
/home/tkloczko/rpmbuild/BUILD/pytest-randomly-3.8.0/tests/test_pytest_randomly.py:300: AssertionError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
============================= test session starts ==============================
platform linux -- Python 3.8.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
Using --randomly-seed=15
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/tkloczko/rpmbuild/BUILD/pytest-randomly-3.8.0/.hypothesis/examples')
rootdir: /tmp/pytest-of-tkloczko/pytest-18/test_classes_reordered0, configfile: pytest.ini
plugins: randomly-3.8.0, forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, cases-3.4.6, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, flaky-3.7.0, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, hypothesis-6.13.7, Faker-8.4.0, cov-2.12.1
collecting ... collected 4 items
test_one.py::D::test_d PASSED
test_one.py::C::test_c PASSED
test_one.py::A::test_a PASSED
test_one.py::B::test_b PASSED
============================== 4 passed in 0.11s ===============================
____________________________________________________________________ test_class_test_methods_reordered _____________________________________________________________________
ourtestdir = <Testdir local('/tmp/pytest-of-tkloczko/pytest-18/test_class_test_methods_reordered0')>
def test_class_test_methods_reordered(ourtestdir):
ourtestdir.makepyfile(
test_one="""
from unittest import TestCase
class T(TestCase):
def test_a(self):
pass
def test_b(self):
pass
def test_c(self):
pass
def test_d(self):
pass
"""
)
args = ["-v", "--randomly-seed=15"]
out = ourtestdir.runpytest(*args)
out.assert_outcomes(passed=4, failed=0)
> assert out.outlines[8:12] == [
"test_one.py::T::test_d PASSED",
"test_one.py::T::test_c PASSED",
"test_one.py::T::test_a PASSED",
"test_one.py::T::test_b PASSED",
]
E AssertionError: assert ['', 'test_on...est_a PASSED'] == ['test_one.py...est_b PASSED']
E At index 0 diff: '' != 'test_one.py::T::test_d PASSED'
E Use -v to get the full diff
/home/tkloczko/rpmbuild/BUILD/pytest-randomly-3.8.0/tests/test_pytest_randomly.py:332: AssertionError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
============================= test session starts ==============================
platform linux -- Python 3.8.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
Using --randomly-seed=15
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/tkloczko/rpmbuild/BUILD/pytest-randomly-3.8.0/.hypothesis/examples')
rootdir: /tmp/pytest-of-tkloczko/pytest-18/test_class_test_methods_reordered0, configfile: pytest.ini
plugins: randomly-3.8.0, forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, cases-3.4.6, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, flaky-3.7.0, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, hypothesis-6.13.7, Faker-8.4.0, cov-2.12.1
collecting ... collected 4 items
test_one.py::T::test_d PASSED
test_one.py::T::test_c PASSED
test_one.py::T::test_a PASSED
test_one.py::T::test_b PASSED
============================== 4 passed in 0.11s ===============================
______________________________________________________________________ test_test_functions_reordered _______________________________________________________________________
ourtestdir = <Testdir local('/tmp/pytest-of-tkloczko/pytest-18/test_test_functions_reordered0')>
def test_test_functions_reordered(ourtestdir):
ourtestdir.makepyfile(
test_one="""
def test_a():
pass
def test_b():
pass
def test_c():
pass
def test_d():
pass
"""
)
args = ["-v", "--randomly-seed=15"]
out = ourtestdir.runpytest(*args)
out.assert_outcomes(passed=4, failed=0)
> assert out.outlines[8:12] == [
"test_one.py::test_d PASSED",
"test_one.py::test_c PASSED",
"test_one.py::test_a PASSED",
"test_one.py::test_b PASSED",
]
E AssertionError: assert ['', 'test_on...est_a PASSED'] == ['test_one.py...est_b PASSED']
E At index 0 diff: '' != 'test_one.py::test_d PASSED'
E Use -v to get the full diff
/home/tkloczko/rpmbuild/BUILD/pytest-randomly-3.8.0/tests/test_pytest_randomly.py:361: AssertionError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
============================= test session starts ==============================
platform linux -- Python 3.8.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
Using --randomly-seed=15
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/tkloczko/rpmbuild/BUILD/pytest-randomly-3.8.0/.hypothesis/examples')
rootdir: /tmp/pytest-of-tkloczko/pytest-18/test_test_functions_reordered0, configfile: pytest.ini
plugins: randomly-3.8.0, forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, cases-3.4.6, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, flaky-3.7.0, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, hypothesis-6.13.7, Faker-8.4.0, cov-2.12.1
collecting ... collected 4 items
test_one.py::test_d PASSED
test_one.py::test_c PASSED
test_one.py::test_a PASSED
test_one.py::test_b PASSED
============================== 4 passed in 0.11s ===============================
_________________________________________________________ test_test_functions_reordered_when_randomness_in_module __________________________________________________________
ourtestdir = <Testdir local('/tmp/pytest-of-tkloczko/pytest-18/test_test_functions_reordered_when_randomness_in_module0')>
def test_test_functions_reordered_when_randomness_in_module(ourtestdir):
ourtestdir.makepyfile(
test_one="""
import random
import time
random.seed(time.time() * 100)
def test_a():
pass
def test_b():
pass
def test_c():
pass
def test_d():
pass
"""
)
args = ["-v", "--randomly-seed=15"]
out = ourtestdir.runpytest(*args)
out.assert_outcomes(passed=4, failed=0)
> assert out.outlines[8:12] == [
"test_one.py::test_d PASSED",
"test_one.py::test_c PASSED",
"test_one.py::test_a PASSED",
"test_one.py::test_b PASSED",
]
E AssertionError: assert ['', 'test_on...est_a PASSED'] == ['test_one.py...est_b PASSED']
E At index 0 diff: '' != 'test_one.py::test_d PASSED'
E Use -v to get the full diff
/home/tkloczko/rpmbuild/BUILD/pytest-randomly-3.8.0/tests/test_pytest_randomly.py:395: AssertionError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
============================= test session starts ==============================
platform linux -- Python 3.8.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
Using --randomly-seed=15
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/tkloczko/rpmbuild/BUILD/pytest-randomly-3.8.0/.hypothesis/examples')
rootdir: /tmp/pytest-of-tkloczko/pytest-18/test_test_functions_reordered_when_randomness_in_module0, configfile: pytest.ini
plugins: randomly-3.8.0, forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, cases-3.4.6, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, flaky-3.7.0, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, hypothesis-6.13.7, Faker-8.4.0, cov-2.12.1
collecting ... collected 4 items
test_one.py::test_d PASSED
test_one.py::test_c PASSED
test_one.py::test_a PASSED
test_one.py::test_b PASSED
============================== 4 passed in 0.11s ===============================
_________________________________________________________________________ test_doctests_reordered __________________________________________________________________________
ourtestdir = <Testdir local('/tmp/pytest-of-tkloczko/pytest-18/test_doctests_reordered0')>
def test_doctests_reordered(ourtestdir):
ourtestdir.makepyfile(
test_one="""
def foo():
'''
>>> foo()
9001
'''
return 9001
def bar():
'''
>>> bar()
9002
'''
return 9002
"""
)
args = ["-v", "--doctest-modules", "--randomly-seed=5"]
out = ourtestdir.runpytest(*args)
out.assert_outcomes(passed=2)
> assert out.outlines[8:10] == [
"test_one.py::test_one.bar PASSED",
"test_one.py::test_one.foo PASSED",
]
E AssertionError: assert ['', 'test_on...e.bar PASSED'] == ['test_one.py...e.foo PASSED']
E At index 0 diff: '' != 'test_one.py::test_one.bar PASSED'
E Use -v to get the full diff
/home/tkloczko/rpmbuild/BUILD/pytest-randomly-3.8.0/tests/test_pytest_randomly.py:425: AssertionError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
============================= test session starts ==============================
platform linux -- Python 3.8.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
Using --randomly-seed=5
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/tkloczko/rpmbuild/BUILD/pytest-randomly-3.8.0/.hypothesis/examples')
rootdir: /tmp/pytest-of-tkloczko/pytest-18/test_doctests_reordered0, configfile: pytest.ini
plugins: randomly-3.8.0, forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, cases-3.4.6, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, flaky-3.7.0, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, hypothesis-6.13.7, Faker-8.4.0, cov-2.12.1
collecting ... collected 2 items
test_one.py::test_one.bar PASSED
test_one.py::test_one.foo PASSED
============================== 2 passed in 0.11s ===============================
___________________________________________________________________ test_doctests_in_txt_files_reordered ___________________________________________________________________
ourtestdir = <Testdir local('/tmp/pytest-of-tkloczko/pytest-18/test_doctests_in_txt_files_reordered0')>
def test_doctests_in_txt_files_reordered(ourtestdir):
ourtestdir.tmpdir.join("test.txt").write(
"""\
>>> 2 + 2
4
"""
)
ourtestdir.tmpdir.join("test2.txt").write(
"""\
>>> 2 - 2
0
"""
)
args = ["-v", "--randomly-seed=1"]
out = ourtestdir.runpytest(*args)
out.assert_outcomes(passed=2)
> assert out.outlines[8:10] == [
"test2.txt::test2.txt PASSED",
"test.txt::test.txt PASSED",
]
E AssertionError: assert ['', 'test2.t...2.txt PASSED'] == ['test2.txt::...t.txt PASSED']
E At index 0 diff: '' != 'test2.txt::test2.txt PASSED'
E Use -v to get the full diff
/home/tkloczko/rpmbuild/BUILD/pytest-randomly-3.8.0/tests/test_pytest_randomly.py:498: AssertionError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
============================= test session starts ==============================
platform linux -- Python 3.8.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
Using --randomly-seed=1
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/tkloczko/rpmbuild/BUILD/pytest-randomly-3.8.0/.hypothesis/examples')
rootdir: /tmp/pytest-of-tkloczko/pytest-18/test_doctests_in_txt_files_reordered0, configfile: pytest.ini
plugins: randomly-3.8.0, forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, cases-3.4.6, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, flaky-3.7.0, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, hypothesis-6.13.7, Faker-8.4.0, cov-2.12.1
collecting ... collected 2 items
test2.txt::test2.txt PASSED
test.txt::test.txt PASSED
============================== 2 passed in 0.10s ===============================
========================================================================= short test summary info ==========================================================================
FAILED tests/test_pytest_randomly.py::test_files_reordered - AssertionError: assert ['', 'test_d....st_it PASSED'] == ['test_d.py::...st_it PASSED']
FAILED tests/test_pytest_randomly.py::test_files_reordered_when_seed_not_reset - AssertionError: assert ['', 'test_d....st_it PASSED'] == ['test_d.py::...st_it PASSED']
FAILED tests/test_pytest_randomly.py::test_classes_reordered - AssertionError: assert ['', 'test_on...est_a PASSED'] == ['test_one.py...est_b PASSED']
FAILED tests/test_pytest_randomly.py::test_class_test_methods_reordered - AssertionError: assert ['', 'test_on...est_a PASSED'] == ['test_one.py...est_b PASSED']
FAILED tests/test_pytest_randomly.py::test_test_functions_reordered - AssertionError: assert ['', 'test_on...est_a PASSED'] == ['test_one.py...est_b PASSED']
FAILED tests/test_pytest_randomly.py::test_test_functions_reordered_when_randomness_in_module - AssertionError: assert ['', 'test_on...est_a PASSED'] == ['test_one.py......
FAILED tests/test_pytest_randomly.py::test_doctests_reordered - AssertionError: assert ['', 'test_on...e.bar PASSED'] == ['test_one.py...e.foo PASSED']
FAILED tests/test_pytest_randomly.py::test_doctests_in_txt_files_reordered - AssertionError: assert ['', 'test2.t...2.txt PASSED'] == ['test2.txt::...t.txt PASSED']
====================================================================== 8 failed, 27 passed in 38.43s =======================================================================