ALT Linux Bugzilla
– Attachment 16611 Details for
Bug 51132
python3-module-pytest-timeout не проходит тесты
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
результат прохождения теста на версии 1.3.3
results (text/plain), 27.84 KB, created by
Богдан Богуславский
on 2024-08-13 13:06:23 MSK
(
hide
)
Description:
результат прохождения теста на версии 1.3.3
Filename:
MIME Type:
Creator:
Богдан Богуславский
Created:
2024-08-13 13:06:23 MSK
Size:
27.84 KB
patch
obsolete
>============================= test session starts ============================== >platform linux -- Python 3.9.18, pytest-7.0.1, pluggy-1.0.0 >rootdir: /home/test/pytest-timeout, configfile: tox.ini >plugins: timeout-1.3.3 >collected 35 items > >test_pytest_timeout.py ....F.F.F.F..F.F.F.F............... [100%] > >=================================== FAILURES =================================== >________________________ test_fix_setup[function-meth0] ________________________ > >meth = MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'})) >scope = 'function' >testdir = <Testdir local('/tmp/.private/test/pytest-of-test/pytest-1/test_fix_setup0')> > > @pytest.mark.parametrize('meth', [have_sigalrm('signal'), 'thread']) > @pytest.mark.parametrize('scope', ['function', 'class', 'module', 'session']) > def test_fix_setup(meth, scope, testdir): > testdir.makepyfile(""" > import time, pytest > > class TestFoo: > > @pytest.fixture(scope='{scope}') > def fix(self): > time.sleep(2) > > def test_foo(self, fix): > pass > """.format(scope=scope)) > result = testdir.runpytest('--timeout=1', > '--timeout-method={0}'.format(meth)) > assert result.ret > 0 >> assert 'Timeout' in result.stdout.str() + result.stderr.str() >E assert 'Timeout' in ('' + 'ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]\n__main__.py: error: argument --timeout-method:... args=(False, \'signal\'), kwargs={\'reason\': \'OS does not have SIGALRM\'}))" (choose from \'signal\', \'thread\')\n') >E + where '' = <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd335310>>() >E + where <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd335310>> = <_pytest.pytester.LineMatcher object at 0x7f77dd335310>.str >E + where <_pytest.pytester.LineMatcher object at 0x7f77dd335310> = <RunResult ret=ExitCode.USAGE_ERROR len(stdout.lines)=0 len(stderr.lines)=3 duration=0.19s>.stdout >E + and 'ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]\n__main__.py: error: argument --timeout-method:... args=(False, \'signal\'), kwargs={\'reason\': \'OS does not have SIGALRM\'}))" (choose from \'signal\', \'thread\')\n' = <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd335430>>() >E + where <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd335430>> = <_pytest.pytester.LineMatcher object at 0x7f77dd335430>.str >E + where <_pytest.pytester.LineMatcher object at 0x7f77dd335430> = <RunResult ret=ExitCode.USAGE_ERROR len(stdout.lines)=0 len(stderr.lines)=3 duration=0.19s>.stderr > >/home/test/pytest-timeout/test_pytest_timeout.py:114: AssertionError >----------------------------- Captured stdout call ----------------------------- >running: /usr/bin/python3 -mpytest --basetemp=/tmp/.private/test/pytest-of-test/pytest-1/test_fix_setup0/runpytest-0 --timeout=1 --timeout-method=MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'})) > in: /tmp/.private/test/pytest-of-test/pytest-1/test_fix_setup0 >----------------------------- Captured stderr call ----------------------------- >ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...] >__main__.py: error: argument --timeout-method: invalid choice: "MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'}))" (choose from 'signal', 'thread') > >_________________________ test_fix_setup[class-meth0] __________________________ > >meth = MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'})) >scope = 'class' >testdir = <Testdir local('/tmp/.private/test/pytest-of-test/pytest-1/test_fix_setup2')> > > @pytest.mark.parametrize('meth', [have_sigalrm('signal'), 'thread']) > @pytest.mark.parametrize('scope', ['function', 'class', 'module', 'session']) > def test_fix_setup(meth, scope, testdir): > testdir.makepyfile(""" > import time, pytest > > class TestFoo: > > @pytest.fixture(scope='{scope}') > def fix(self): > time.sleep(2) > > def test_foo(self, fix): > pass > """.format(scope=scope)) > result = testdir.runpytest('--timeout=1', > '--timeout-method={0}'.format(meth)) > assert result.ret > 0 >> assert 'Timeout' in result.stdout.str() + result.stderr.str() >E assert 'Timeout' in ('' + 'ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]\n__main__.py: error: argument --timeout-method:... args=(False, \'signal\'), kwargs={\'reason\': \'OS does not have SIGALRM\'}))" (choose from \'signal\', \'thread\')\n') >E + where '' = <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd35aa00>>() >E + where <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd35aa00>> = <_pytest.pytester.LineMatcher object at 0x7f77dd35aa00>.str >E + where <_pytest.pytester.LineMatcher object at 0x7f77dd35aa00> = <RunResult ret=ExitCode.USAGE_ERROR len(stdout.lines)=0 len(stderr.lines)=3 duration=0.19s>.stdout >E + and 'ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]\n__main__.py: error: argument --timeout-method:... args=(False, \'signal\'), kwargs={\'reason\': \'OS does not have SIGALRM\'}))" (choose from \'signal\', \'thread\')\n' = <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd35a8e0>>() >E + where <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd35a8e0>> = <_pytest.pytester.LineMatcher object at 0x7f77dd35a8e0>.str >E + where <_pytest.pytester.LineMatcher object at 0x7f77dd35a8e0> = <RunResult ret=ExitCode.USAGE_ERROR len(stdout.lines)=0 len(stderr.lines)=3 duration=0.19s>.stderr > >/home/test/pytest-timeout/test_pytest_timeout.py:114: AssertionError >----------------------------- Captured stdout call ----------------------------- >running: /usr/bin/python3 -mpytest --basetemp=/tmp/.private/test/pytest-of-test/pytest-1/test_fix_setup2/runpytest-0 --timeout=1 --timeout-method=MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'})) > in: /tmp/.private/test/pytest-of-test/pytest-1/test_fix_setup2 >----------------------------- Captured stderr call ----------------------------- >ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...] >__main__.py: error: argument --timeout-method: invalid choice: "MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'}))" (choose from 'signal', 'thread') > >_________________________ test_fix_setup[module-meth0] _________________________ > >meth = MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'})) >scope = 'module' >testdir = <Testdir local('/tmp/.private/test/pytest-of-test/pytest-1/test_fix_setup4')> > > @pytest.mark.parametrize('meth', [have_sigalrm('signal'), 'thread']) > @pytest.mark.parametrize('scope', ['function', 'class', 'module', 'session']) > def test_fix_setup(meth, scope, testdir): > testdir.makepyfile(""" > import time, pytest > > class TestFoo: > > @pytest.fixture(scope='{scope}') > def fix(self): > time.sleep(2) > > def test_foo(self, fix): > pass > """.format(scope=scope)) > result = testdir.runpytest('--timeout=1', > '--timeout-method={0}'.format(meth)) > assert result.ret > 0 >> assert 'Timeout' in result.stdout.str() + result.stderr.str() >E assert 'Timeout' in ('' + 'ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]\n__main__.py: error: argument --timeout-method:... args=(False, \'signal\'), kwargs={\'reason\': \'OS does not have SIGALRM\'}))" (choose from \'signal\', \'thread\')\n') >E + where '' = <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd36a220>>() >E + where <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd36a220>> = <_pytest.pytester.LineMatcher object at 0x7f77dd36a220>.str >E + where <_pytest.pytester.LineMatcher object at 0x7f77dd36a220> = <RunResult ret=ExitCode.USAGE_ERROR len(stdout.lines)=0 len(stderr.lines)=3 duration=0.19s>.stdout >E + and 'ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]\n__main__.py: error: argument --timeout-method:... args=(False, \'signal\'), kwargs={\'reason\': \'OS does not have SIGALRM\'}))" (choose from \'signal\', \'thread\')\n' = <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd36a040>>() >E + where <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd36a040>> = <_pytest.pytester.LineMatcher object at 0x7f77dd36a040>.str >E + where <_pytest.pytester.LineMatcher object at 0x7f77dd36a040> = <RunResult ret=ExitCode.USAGE_ERROR len(stdout.lines)=0 len(stderr.lines)=3 duration=0.19s>.stderr > >/home/test/pytest-timeout/test_pytest_timeout.py:114: AssertionError >----------------------------- Captured stdout call ----------------------------- >running: /usr/bin/python3 -mpytest --basetemp=/tmp/.private/test/pytest-of-test/pytest-1/test_fix_setup4/runpytest-0 --timeout=1 --timeout-method=MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'})) > in: /tmp/.private/test/pytest-of-test/pytest-1/test_fix_setup4 >----------------------------- Captured stderr call ----------------------------- >ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...] >__main__.py: error: argument --timeout-method: invalid choice: "MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'}))" (choose from 'signal', 'thread') > >________________________ test_fix_setup[session-meth0] _________________________ > >meth = MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'})) >scope = 'session' >testdir = <Testdir local('/tmp/.private/test/pytest-of-test/pytest-1/test_fix_setup6')> > > @pytest.mark.parametrize('meth', [have_sigalrm('signal'), 'thread']) > @pytest.mark.parametrize('scope', ['function', 'class', 'module', 'session']) > def test_fix_setup(meth, scope, testdir): > testdir.makepyfile(""" > import time, pytest > > class TestFoo: > > @pytest.fixture(scope='{scope}') > def fix(self): > time.sleep(2) > > def test_foo(self, fix): > pass > """.format(scope=scope)) > result = testdir.runpytest('--timeout=1', > '--timeout-method={0}'.format(meth)) > assert result.ret > 0 >> assert 'Timeout' in result.stdout.str() + result.stderr.str() >E assert 'Timeout' in ('' + 'ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]\n__main__.py: error: argument --timeout-method:... args=(False, \'signal\'), kwargs={\'reason\': \'OS does not have SIGALRM\'}))" (choose from \'signal\', \'thread\')\n') >E + where '' = <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd335be0>>() >E + where <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd335be0>> = <_pytest.pytester.LineMatcher object at 0x7f77dd335be0>.str >E + where <_pytest.pytester.LineMatcher object at 0x7f77dd335be0> = <RunResult ret=ExitCode.USAGE_ERROR len(stdout.lines)=0 len(stderr.lines)=3 duration=0.19s>.stdout >E + and 'ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]\n__main__.py: error: argument --timeout-method:... args=(False, \'signal\'), kwargs={\'reason\': \'OS does not have SIGALRM\'}))" (choose from \'signal\', \'thread\')\n' = <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd335340>>() >E + where <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd335340>> = <_pytest.pytester.LineMatcher object at 0x7f77dd335340>.str >E + where <_pytest.pytester.LineMatcher object at 0x7f77dd335340> = <RunResult ret=ExitCode.USAGE_ERROR len(stdout.lines)=0 len(stderr.lines)=3 duration=0.19s>.stderr > >/home/test/pytest-timeout/test_pytest_timeout.py:114: AssertionError >----------------------------- Captured stdout call ----------------------------- >running: /usr/bin/python3 -mpytest --basetemp=/tmp/.private/test/pytest-of-test/pytest-1/test_fix_setup6/runpytest-0 --timeout=1 --timeout-method=MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'})) > in: /tmp/.private/test/pytest-of-test/pytest-1/test_fix_setup6 >----------------------------- Captured stderr call ----------------------------- >ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...] >__main__.py: error: argument --timeout-method: invalid choice: "MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'}))" (choose from 'signal', 'thread') > >______________________ test_fix_finalizer[function-meth0] ______________________ > >meth = MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'})) >scope = 'function' >testdir = <Testdir local('/tmp/.private/test/pytest-of-test/pytest-1/test_fix_finalizer0')> > > @pytest.mark.parametrize('meth', [have_sigalrm('signal'), 'thread']) > @pytest.mark.parametrize('scope', ['function', 'class', 'module', 'session']) > def test_fix_finalizer(meth, scope, testdir): > testdir.makepyfile(""" > import time, pytest > > class TestFoo: > > @pytest.fixture > def fix(self, request): > print('fix setup') > def fin(): > print('fix finaliser') > time.sleep(2) > request.addfinalizer(fin) > > def test_foo(self, fix): > pass > """) > result = testdir.runpytest('--timeout=1', '-s', > '--timeout-method={0}'.format(meth)) > assert result.ret > 0 >> assert 'Timeout' in result.stdout.str() + result.stderr.str() >E assert 'Timeout' in ('' + 'ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]\n__main__.py: error: argument --timeout-method:... args=(False, \'signal\'), kwargs={\'reason\': \'OS does not have SIGALRM\'}))" (choose from \'signal\', \'thread\')\n') >E + where '' = <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd36b550>>() >E + where <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd36b550>> = <_pytest.pytester.LineMatcher object at 0x7f77dd36b550>.str >E + where <_pytest.pytester.LineMatcher object at 0x7f77dd36b550> = <RunResult ret=ExitCode.USAGE_ERROR len(stdout.lines)=0 len(stderr.lines)=3 duration=0.19s>.stdout >E + and 'ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]\n__main__.py: error: argument --timeout-method:... args=(False, \'signal\'), kwargs={\'reason\': \'OS does not have SIGALRM\'}))" (choose from \'signal\', \'thread\')\n' = <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd36b310>>() >E + where <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd36b310>> = <_pytest.pytester.LineMatcher object at 0x7f77dd36b310>.str >E + where <_pytest.pytester.LineMatcher object at 0x7f77dd36b310> = <RunResult ret=ExitCode.USAGE_ERROR len(stdout.lines)=0 len(stderr.lines)=3 duration=0.19s>.stderr > >/home/test/pytest-timeout/test_pytest_timeout.py:158: AssertionError >----------------------------- Captured stdout call ----------------------------- >running: /usr/bin/python3 -mpytest --basetemp=/tmp/.private/test/pytest-of-test/pytest-1/test_fix_finalizer0/runpytest-0 --timeout=1 -s --timeout-method=MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'})) > in: /tmp/.private/test/pytest-of-test/pytest-1/test_fix_finalizer0 >----------------------------- Captured stderr call ----------------------------- >ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...] >__main__.py: error: argument --timeout-method: invalid choice: "MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'}))" (choose from 'signal', 'thread') > >_______________________ test_fix_finalizer[class-meth0] ________________________ > >meth = MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'})) >scope = 'class' >testdir = <Testdir local('/tmp/.private/test/pytest-of-test/pytest-1/test_fix_finalizer2')> > > @pytest.mark.parametrize('meth', [have_sigalrm('signal'), 'thread']) > @pytest.mark.parametrize('scope', ['function', 'class', 'module', 'session']) > def test_fix_finalizer(meth, scope, testdir): > testdir.makepyfile(""" > import time, pytest > > class TestFoo: > > @pytest.fixture > def fix(self, request): > print('fix setup') > def fin(): > print('fix finaliser') > time.sleep(2) > request.addfinalizer(fin) > > def test_foo(self, fix): > pass > """) > result = testdir.runpytest('--timeout=1', '-s', > '--timeout-method={0}'.format(meth)) > assert result.ret > 0 >> assert 'Timeout' in result.stdout.str() + result.stderr.str() >E assert 'Timeout' in ('' + 'ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]\n__main__.py: error: argument --timeout-method:... args=(False, \'signal\'), kwargs={\'reason\': \'OS does not have SIGALRM\'}))" (choose from \'signal\', \'thread\')\n') >E + where '' = <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd2ff850>>() >E + where <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd2ff850>> = <_pytest.pytester.LineMatcher object at 0x7f77dd2ff850>.str >E + where <_pytest.pytester.LineMatcher object at 0x7f77dd2ff850> = <RunResult ret=ExitCode.USAGE_ERROR len(stdout.lines)=0 len(stderr.lines)=3 duration=0.19s>.stdout >E + and 'ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]\n__main__.py: error: argument --timeout-method:... args=(False, \'signal\'), kwargs={\'reason\': \'OS does not have SIGALRM\'}))" (choose from \'signal\', \'thread\')\n' = <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd2ff6d0>>() >E + where <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd2ff6d0>> = <_pytest.pytester.LineMatcher object at 0x7f77dd2ff6d0>.str >E + where <_pytest.pytester.LineMatcher object at 0x7f77dd2ff6d0> = <RunResult ret=ExitCode.USAGE_ERROR len(stdout.lines)=0 len(stderr.lines)=3 duration=0.19s>.stderr > >/home/test/pytest-timeout/test_pytest_timeout.py:158: AssertionError >----------------------------- Captured stdout call ----------------------------- >running: /usr/bin/python3 -mpytest --basetemp=/tmp/.private/test/pytest-of-test/pytest-1/test_fix_finalizer2/runpytest-0 --timeout=1 -s --timeout-method=MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'})) > in: /tmp/.private/test/pytest-of-test/pytest-1/test_fix_finalizer2 >----------------------------- Captured stderr call ----------------------------- >ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...] >__main__.py: error: argument --timeout-method: invalid choice: "MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'}))" (choose from 'signal', 'thread') > >_______________________ test_fix_finalizer[module-meth0] _______________________ > >meth = MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'})) >scope = 'module' >testdir = <Testdir local('/tmp/.private/test/pytest-of-test/pytest-1/test_fix_finalizer4')> > > @pytest.mark.parametrize('meth', [have_sigalrm('signal'), 'thread']) > @pytest.mark.parametrize('scope', ['function', 'class', 'module', 'session']) > def test_fix_finalizer(meth, scope, testdir): > testdir.makepyfile(""" > import time, pytest > > class TestFoo: > > @pytest.fixture > def fix(self, request): > print('fix setup') > def fin(): > print('fix finaliser') > time.sleep(2) > request.addfinalizer(fin) > > def test_foo(self, fix): > pass > """) > result = testdir.runpytest('--timeout=1', '-s', > '--timeout-method={0}'.format(meth)) > assert result.ret > 0 >> assert 'Timeout' in result.stdout.str() + result.stderr.str() >E assert 'Timeout' in ('' + 'ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]\n__main__.py: error: argument --timeout-method:... args=(False, \'signal\'), kwargs={\'reason\': \'OS does not have SIGALRM\'}))" (choose from \'signal\', \'thread\')\n') >E + where '' = <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd32c2e0>>() >E + where <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd32c2e0>> = <_pytest.pytester.LineMatcher object at 0x7f77dd32c2e0>.str >E + where <_pytest.pytester.LineMatcher object at 0x7f77dd32c2e0> = <RunResult ret=ExitCode.USAGE_ERROR len(stdout.lines)=0 len(stderr.lines)=3 duration=0.19s>.stdout >E + and 'ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]\n__main__.py: error: argument --timeout-method:... args=(False, \'signal\'), kwargs={\'reason\': \'OS does not have SIGALRM\'}))" (choose from \'signal\', \'thread\')\n' = <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd32c190>>() >E + where <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd32c190>> = <_pytest.pytester.LineMatcher object at 0x7f77dd32c190>.str >E + where <_pytest.pytester.LineMatcher object at 0x7f77dd32c190> = <RunResult ret=ExitCode.USAGE_ERROR len(stdout.lines)=0 len(stderr.lines)=3 duration=0.19s>.stderr > >/home/test/pytest-timeout/test_pytest_timeout.py:158: AssertionError >----------------------------- Captured stdout call ----------------------------- >running: /usr/bin/python3 -mpytest --basetemp=/tmp/.private/test/pytest-of-test/pytest-1/test_fix_finalizer4/runpytest-0 --timeout=1 -s --timeout-method=MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'})) > in: /tmp/.private/test/pytest-of-test/pytest-1/test_fix_finalizer4 >----------------------------- Captured stderr call ----------------------------- >ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...] >__main__.py: error: argument --timeout-method: invalid choice: "MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'}))" (choose from 'signal', 'thread') > >______________________ test_fix_finalizer[session-meth0] _______________________ > >meth = MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'})) >scope = 'session' >testdir = <Testdir local('/tmp/.private/test/pytest-of-test/pytest-1/test_fix_finalizer6')> > > @pytest.mark.parametrize('meth', [have_sigalrm('signal'), 'thread']) > @pytest.mark.parametrize('scope', ['function', 'class', 'module', 'session']) > def test_fix_finalizer(meth, scope, testdir): > testdir.makepyfile(""" > import time, pytest > > class TestFoo: > > @pytest.fixture > def fix(self, request): > print('fix setup') > def fin(): > print('fix finaliser') > time.sleep(2) > request.addfinalizer(fin) > > def test_foo(self, fix): > pass > """) > result = testdir.runpytest('--timeout=1', '-s', > '--timeout-method={0}'.format(meth)) > assert result.ret > 0 >> assert 'Timeout' in result.stdout.str() + result.stderr.str() >E assert 'Timeout' in ('' + 'ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]\n__main__.py: error: argument --timeout-method:... args=(False, \'signal\'), kwargs={\'reason\': \'OS does not have SIGALRM\'}))" (choose from \'signal\', \'thread\')\n') >E + where '' = <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd323640>>() >E + where <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd323640>> = <_pytest.pytester.LineMatcher object at 0x7f77dd323640>.str >E + where <_pytest.pytester.LineMatcher object at 0x7f77dd323640> = <RunResult ret=ExitCode.USAGE_ERROR len(stdout.lines)=0 len(stderr.lines)=3 duration=0.19s>.stdout >E + and 'ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]\n__main__.py: error: argument --timeout-method:... args=(False, \'signal\'), kwargs={\'reason\': \'OS does not have SIGALRM\'}))" (choose from \'signal\', \'thread\')\n' = <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd323580>>() >E + where <bound method LineMatcher.str of <_pytest.pytester.LineMatcher object at 0x7f77dd323580>> = <_pytest.pytester.LineMatcher object at 0x7f77dd323580>.str >E + where <_pytest.pytester.LineMatcher object at 0x7f77dd323580> = <RunResult ret=ExitCode.USAGE_ERROR len(stdout.lines)=0 len(stderr.lines)=3 duration=0.19s>.stderr > >/home/test/pytest-timeout/test_pytest_timeout.py:158: AssertionError >----------------------------- Captured stdout call ----------------------------- >running: /usr/bin/python3 -mpytest --basetemp=/tmp/.private/test/pytest-of-test/pytest-1/test_fix_finalizer6/runpytest-0 --timeout=1 -s --timeout-method=MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'})) > in: /tmp/.private/test/pytest-of-test/pytest-1/test_fix_finalizer6 >----------------------------- Captured stderr call ----------------------------- >ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...] >__main__.py: error: argument --timeout-method: invalid choice: "MarkDecorator(mark=Mark(name='skipif', args=(False, 'signal'), kwargs={'reason': 'OS does not have SIGALRM'}))" (choose from 'signal', 'thread') > >=========================== short test summary info ============================ >FAILED test_pytest_timeout.py::test_fix_setup[function-meth0] - assert 'Timeo... >FAILED test_pytest_timeout.py::test_fix_setup[class-meth0] - assert 'Timeout'... >FAILED test_pytest_timeout.py::test_fix_setup[module-meth0] - assert 'Timeout... >FAILED test_pytest_timeout.py::test_fix_setup[session-meth0] - assert 'Timeou... >FAILED test_pytest_timeout.py::test_fix_finalizer[function-meth0] - assert 'T... >FAILED test_pytest_timeout.py::test_fix_finalizer[class-meth0] - assert 'Time... >FAILED test_pytest_timeout.py::test_fix_finalizer[module-meth0] - assert 'Tim... >FAILED test_pytest_timeout.py::test_fix_finalizer[session-meth0] - assert 'Ti... >======================== 8 failed, 27 passed in 36.32s =========================
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 51132
:
16610
| 16611