From issues-reply at bitbucket.org Tue Dec 4 16:34:54 2012 From: issues-reply at bitbucket.org (Sorin Sbarnea) Date: Tue, 04 Dec 2012 15:34:54 -0000 Subject: [py-svn] [hpk42/pytest] pytest-xdist fails ImportError: No module named shutil (stdlib missing form virtual env) (issue #235) Message-ID: <934e4f3bf96781456f884278d4cb04f3@bitbucket.org> --- you can reply above this line --- New issue 235: pytest-xdist fails ImportError: No module named shutil (stdlib missing form virtual env) https://bitbucket.org/hpk42/pytest/issue/235/pytest-xdist-fails-importerror-no-module Sorin Sbarnea: I tried to run the test distributed but while they do work locally, they still fail when distributed. It seems to be a problem related to virtualenv which creates an invalid python environment, one where python does not have it's stdlib ``` #!python ERROR: InvocationError: '/var/local/jira/contrib/.tox/py26/bin/py.test --growl -n 4 --maxfail=2 --durations=3 -v --cov-report xml --cov scripts --ignore=scripts/contrib/ scripts/tests/' py26 finish: runtests after 0.59 seconds py25 start: getenv /var/local/jira/contrib/.tox/py25 py25 create: /var/local/jira/contrib/.tox/py25 removing /var/local/jira/contrib/.tox/py25 /var/local/jira/contrib/.tox$ /usr/bin/python2.5 /usr/local/lib/python2.6/dist-packages/virtualenv-1.8.4-py2.6.egg/virtualenv.py --distribute py25 >/var/local/jira/contrib/.tox/py25/log/py25-0.log ERROR: invocation failed, logfile: /var/local/jira/contrib/.tox/py25/log/py25-0.log ERROR: actionid=py25 msg=getenv cmdargs=['/usr/bin/python2.5', '/usr/local/lib/python2.6/dist-packages/virtualenv-1.8.4-py2.6.egg/virtualenv.py', '--distribute', 'py25'] env={'SSH_CLIENT': '10.80.118.154 59041 22', 'LOGNAME': 'root', 'USER': 'root', 'PROMPT_COMMAND': 'pwd>&8;kill -STOP $$', 'PATH': '/var/local/jira/contrib/.tox/py25/bin:/opt/jira/sdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'HOME': '/root', 'DISPLAY': 'localhost:10.0', 'LANG': 'en_GB.UTF-8', 'TERM': 'xterm-256color', 'SHELL': '/bin/bash', 'XDG_SESSION_COOKIE': 'd53aaac1af87886705962bb300000a75-1354626562.587103-692708731', 'LANGUAGE': 'en_GB:en', 'SHLVL': '2', 'MAVEN_OPTS': '-Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Xmx2048m', 'MC_TMPDIR': '/tmp/mc-root', 'EDITOR': 'mcedit', 'M2_HOME': '/root/dev/jira/jira-libs.hg/sdk/apache-maven', 'MC_SID': '23137', 'SSH_AUTH_SOCK': '/tmp/ssh-EIlDU23033/agent.23033', 'DIFFTOOL': 'araxisopendiff', 'MAVEN_COLOR': 'true', 'ATLAS_OPTS': '-Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Xmx2048m', '_': './test', 'LSCOLORS': 'ExFxCxDxBxegedabagacad', 'AUTOSSH_PORT': '0', 'SSH_TTY': '/dev/pts/0', 'OLDPWD': '/var/local/jira/contrib/scripts', 'CLICOLOR': '1', 'HISTCONTROL': 'ignorespace', 'PWD': '/var/local/jira/contrib', 'PYTHONWARNINGS': '', 'MAIL': '/var/mail/root', 'SSH_CONNECTION': '10.80.118.154 59041 10.80.225.83 22'} 'import site' failed; use -v for traceback New python executable in py25/bin/python2.5 Also creating executable in py25/bin/python Installing distribute....... Complete output from command /var/local/jira/cont...x/py25/bin/python2.5 -c "#!python \"\"\"Bootstra... sys.exit(main()) ": 'import site' failed; use -v for traceback Traceback (most recent call last): File "", line 17, in ImportError: No module named shutil ---------------------------------------- ...Installing distribute...done. Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/virtualenv-1.8.4-py2.6.egg/virtualenv.py", line 2560, in main() File "/usr/local/lib/python2.6/dist-packages/virtualenv-1.8.4-py2.6.egg/virtualenv.py", line 964, in main never_download=options.never_download) File "/usr/local/lib/python2.6/dist-packages/virtualenv-1.8.4-py2.6.egg/virtualenv.py", line 1071, in create_environment search_dirs=search_dirs, never_download=never_download) File "/usr/local/lib/python2.6/dist-packages/virtualenv-1.8.4-py2.6.egg/virtualenv.py", line 616, in install_distribute search_dirs=search_dirs, never_download=never_download) File "/usr/local/lib/python2.6/dist-packages/virtualenv-1.8.4-py2.6.egg/virtualenv.py", line 583, in _install_req cwd=cwd) File "/usr/local/lib/python2.6/dist-packages/virtualenv-1.8.4-py2.6.egg/virtualenv.py", line 1042, in call_subprocess % (cmd_desc, proc.returncode)) OSError: Command /var/local/jira/cont...x/py25/bin/python2.5 -c "#!python \"\"\"Bootstra... sys.exit(main()) " failed with error code 1 ERROR: InvocationError: /usr/bin/python2.5 /usr/local/lib/python2.6/dist-packages/virtualenv-1.8.4-py2.6.egg/virtualenv.py --distribute py25 (see /var/local/jira/contrib/.tox/py25/log/py25-0.log) py25 finish: getenv after 0.23 seconds ``` This is py.test version 2.3.4, imported from /usr/local/lib/python2.6/dist-packages/pytest.py Running on Debian Let me know if you need further information/tests. -- This is an issue notification from bitbucket.org. You are receiving this either because you are the owner of the issue, or you are following the issue. From commits-noreply at bitbucket.org Tue Dec 4 20:31:45 2012 From: commits-noreply at bitbucket.org (Bitbucket) Date: Tue, 04 Dec 2012 19:31:45 -0000 Subject: [py-svn] commit/pytest: hpk42: fix test after ronny's pytest-debug improvements Message-ID: <20121204193145.23373.66360@bitbucket23.managed.contegix.com> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/changeset/4647d2714061/ changeset: 4647d2714061 user: hpk42 date: 2012-12-04 20:31:37 summary: fix test after ronny's pytest-debug improvements affected #: 1 file diff -r 4cff6242f274afa4a47ede78139e63fdb726828b -r 4647d271406184af5b98137bdd67d8e33f282f88 testing/test_helpconfig.py --- a/testing/test_helpconfig.py +++ b/testing/test_helpconfig.py @@ -76,5 +76,6 @@ result = testdir.runpytest() assert result.ret == 0 result.stderr.fnmatch_lines([ - "*registered*PluginManager*" + "*pytest_plugin_registered*", + "*manager*PluginManager*" ]) Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Fri Dec 7 12:16:36 2012 From: issues-reply at bitbucket.org (Floris Bruynooghe) Date: Fri, 07 Dec 2012 11:16:36 -0000 Subject: [py-svn] [hpk42/pytest] Support nose.plugins.skip.SkipTest at import time (issue #236) Message-ID: <6ab45cb404c3008d254a8dc69c73b730@bitbucket.org> --- you can reply above this line --- New issue 236: Support nose.plugins.skip.SkipTest at import time https://bitbucket.org/hpk42/pytest/issue/236/support-nosepluginsskipskiptest-at-import Floris Bruynooghe: It seems in nose you can raise nose.plugins.skip.SkipTest at import time of a test module. Nose will then just list this as a skipped test. When running this with py.test this will show up as an collection error instead (which is annoying since -x stops on it). It would be nice if py.test would recognise this exception and also list the module as skipped. -- This is an issue notification from bitbucket.org. You are receiving this either because you are the owner of the issue, or you are following the issue. From issues-reply at bitbucket.org Sun Dec 9 02:19:33 2012 From: issues-reply at bitbucket.org (Marc Abramowitz) Date: Sun, 09 Dec 2012 01:19:33 -0000 Subject: [py-svn] [hpk42/tox] Failing tests on hg tip (issue #75) Message-ID: <7ec3ffb9be354e5a8406f925280f213e@bitbucket.org> --- you can reply above this line --- New issue 75: Failing tests on hg tip https://bitbucket.org/hpk42/tox/issue/75/failing-tests-on-hg-tip Marc Abramowitz: Something about "py24". Is it because I don't have Python 2.4 installed? (a pain to build on recent versions of OS X) ``` marc at hyperion:~/dev/hg-repos/tox 16:58:14 $ tox -e py27 GLOB sdist-make: /Users/marc/dev/hg-repos/tox/setup.py py27 sdist-reinst: /Users/marc/dev/hg-repos/tox/.tox/dist/tox-1.4.3.dev3.zip py27 runtests: commands[0] ============================================================================= test session starts ============================================================================== platform darwin -- Python 2.7.3 -- pytest-2.3.4 tox comes from: '/Users/marc/dev/hg-repos/tox/.tox/py27/lib/python2.7/site-packages/tox/__init__.pyc' collected 133 items tests/test_config.py ........................F.....F.FFFFF......FF...F.FF............... tests/test_quickstart.py ............. tests/test_venv.py .s............s.............. tests/test_z_cmdline.py ........................ =================================================================================== FAILURES =================================================================================== ______________________________________________________________ TestConfigTestEnv.test_specific_command_overrides _______________________________________________________________ self = tmpdir = local('/private/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/pytest-8/test_specific_command_overrides0'), newconfig = def test_specific_command_overrides(self, tmpdir, newconfig): config = newconfig(""" [testenv] commands=xyz [testenv:py30] commands=abc """) > assert len(config.envconfigs) == 1 E assert 0 == 1 E + where 0 = len({}) E + where {} = .envconfigs /Users/marc/dev/hg-repos/tox/tests/test_config.py:342: AssertionError ------------------------------------------------------------------------------- Captured stdout -------------------------------------------------------------------------------- ERROR: InterpreterNotFound: python3.0 ________________________________________________________________________ TestConfigTestEnv.test_simple _________________________________________________________________________ tmpdir = , newconfig = def test_simple(tmpdir, newconfig): config = newconfig(""" [testenv:py24] basepython=python2.4 [testenv:py25] basepython=python2.5 """) > assert len(config.envconfigs) == 2 E assert 0 == 2 E + where 0 = len({}) E + where {} = .envconfigs /Users/marc/dev/hg-repos/tox/tests/test_config.py:408: AssertionError ------------------------------------------------------------------------------- Captured stdout -------------------------------------------------------------------------------- ERROR: InterpreterNotFound: python2.4 _________________________________________________________________ TestConfigTestEnv.test_substitution_defaults _________________________________________________________________ tmpdir = , newconfig = def test_substitution_defaults(tmpdir, newconfig): config = newconfig(""" [testenv:py24] commands = {toxinidir} {toxworkdir} {envdir} {envbindir} {envtmpdir} {envpython} {homedir} {distshare} {envlogdir} """) > conf = config.envconfigs['py24'] E KeyError: 'py24' /Users/marc/dev/hg-repos/tox/tests/test_config.py:432: KeyError ------------------------------------------------------------------------------- Captured stdout -------------------------------------------------------------------------------- ERROR: InterpreterNotFound: python2.4 ________________________________________________________________ TestConfigTestEnv.test_substitution_positional ________________________________________________________________ self = , newconfig = def test_substitution_positional(self, newconfig): inisource = """ [testenv:py24] commands = cmd1 [hello] \ world cmd1 {posargs:hello} \ world """ > conf = newconfig([], inisource).envconfigs['py24'] E KeyError: 'py24' /Users/marc/dev/hg-repos/tox/tests/test_config.py:453: KeyError ------------------------------------------------------------------------------- Captured stdout -------------------------------------------------------------------------------- ERROR: InterpreterNotFound: python2.4 ____________________________________________________________________ TestConfigTestEnv.test_rewrite_posargs ____________________________________________________________________ self = , tmpdir = local('/private/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/pytest-8/test_rewrite_posargs0') newconfig = def test_rewrite_posargs(self, tmpdir, newconfig): inisource = """ [testenv:py24] args_are_paths = True changedir = tests commands = cmd1 {posargs:hello} """ > conf = newconfig([], inisource).envconfigs['py24'] E KeyError: 'py24' /Users/marc/dev/hg-repos/tox/tests/test_config.py:469: KeyError ------------------------------------------------------------------------------- Captured stdout -------------------------------------------------------------------------------- ERROR: InterpreterNotFound: python2.4 ________________________________________________________________ TestConfigTestEnv.test_rewrite_simple_posargs _________________________________________________________________ self = tmpdir = local('/private/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/pytest-8/test_rewrite_simple_posargs0'), newconfig = def test_rewrite_simple_posargs(self, tmpdir, newconfig): inisource = """ [testenv:py24] args_are_paths = True changedir = tests commands = cmd1 {posargs} """ > conf = newconfig([], inisource).envconfigs['py24'] E KeyError: 'py24' /Users/marc/dev/hg-repos/tox/tests/test_config.py:489: KeyError ------------------------------------------------------------------------------- Captured stdout -------------------------------------------------------------------------------- ERROR: InterpreterNotFound: python2.4 _________________________________________________________ TestConfigTestEnv.test_take_dependencies_from_other_testenv __________________________________________________________ self = , newconfig = def test_take_dependencies_from_other_testenv(self, newconfig): inisource=""" [testenv] deps= pytest pytest-cov [testenv:py24] deps= {[testenv]deps} fun """ > conf = newconfig([], inisource).envconfigs['py24'] E KeyError: 'py24' /Users/marc/dev/hg-repos/tox/tests/test_config.py:513: KeyError ------------------------------------------------------------------------------- Captured stdout -------------------------------------------------------------------------------- ERROR: InterpreterNotFound: python2.4 _____________________________________________________________ TestGlobalOptions.test_substitution_jenkins_default ______________________________________________________________ self = tmpdir = local('/private/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/pytest-8/test_substitution_jenkins_default0') monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x101c36050>, newconfig = def test_substitution_jenkins_default(self, tmpdir, monkeypatch, newconfig): monkeypatch.setenv("HUDSON_URL", "xyz") config = newconfig(""" [testenv:py24] commands = {distshare} """) > conf = config.envconfigs['py24'] E KeyError: 'py24' /Users/marc/dev/hg-repos/tox/tests/test_config.py:611: KeyError ------------------------------------------------------------------------------- Captured stdout -------------------------------------------------------------------------------- ERROR: InterpreterNotFound: python2.4 _____________________________________________________________ TestGlobalOptions.test_substitution_jenkins_context ______________________________________________________________ self = tmpdir = local('/private/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/pytest-8/test_substitution_jenkins_context0') monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x101c73320>, newconfig = def test_substitution_jenkins_context(self, tmpdir, monkeypatch, newconfig): monkeypatch.setenv("HUDSON_URL", "xyz") monkeypatch.setenv("WORKSPACE", tmpdir) config = newconfig(""" [tox:jenkins] distshare = {env:WORKSPACE}/hello [testenv:py24] commands = {distshare} """) > conf = config.envconfigs['py24'] E KeyError: 'py24' /Users/marc/dev/hg-repos/tox/tests/test_config.py:626: KeyError ------------------------------------------------------------------------------- Captured stdout -------------------------------------------------------------------------------- ERROR: InterpreterNotFound: python2.4 _________________________________________________________________ TestGlobalOptions.test_default_environments __________________________________________________________________ self = , tmpdir = local('/private/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/pytest-8/test_default_environments0') newconfig = , monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x10180d830> def test_default_environments(self, tmpdir, newconfig, monkeypatch): envs = "py24,py25,py26,py27,py30,py31,py32,jython,pypy" inisource = """ [tox] envlist = %s """ % envs config = newconfig([], inisource) envlist = envs.split(",") assert config.envlist == envlist for name in config.envlist: > env = config.envconfigs[name] E KeyError: 'py24' /Users/marc/dev/hg-repos/tox/tests/test_config.py:681: KeyError ------------------------------------------------------------------------------- Captured stdout -------------------------------------------------------------------------------- ERROR: InterpreterNotFound: python2.4 ________________________________________________________________ TestGlobalOptions.test_defaultenv_commandline _________________________________________________________________ self = tmpdir = local('/private/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/pytest-8/test_defaultenv_commandline0'), newconfig = monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x101cb0170> def test_defaultenv_commandline(self, tmpdir, newconfig, monkeypatch): config = newconfig(["-epy24"], "") > env = config.envconfigs['py24'] E KeyError: 'py24' /Users/marc/dev/hg-repos/tox/tests/test_config.py:701: KeyError ------------------------------------------------------------------------------- Captured stdout -------------------------------------------------------------------------------- ERROR: InterpreterNotFound: python2.4 ______________________________________________________________ TestGlobalOptions.test_defaultenv_partial_override ______________________________________________________________ self = tmpdir = local('/private/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/pytest-8/test_defaultenv_partial_override0'), newconfig = monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x101968170> def test_defaultenv_partial_override(self, tmpdir, newconfig, monkeypatch): inisource = """ [tox] envlist = py24 [testenv:py24] commands= xyz """ config = newconfig([], inisource) > env = config.envconfigs['py24'] E KeyError: 'py24' /Users/marc/dev/hg-repos/tox/tests/test_config.py:713: KeyError ------------------------------------------------------------------------------- Captured stdout -------------------------------------------------------------------------------- ERROR: InterpreterNotFound: python2.4 ------------------------------------------------ generated xml file: /Users/marc/dev/hg-repos/tox/.tox/py27/log/junit-py27.xml ------------------------------------------------- ============================================================== 12 failed, 119 passed, 2 skipped in 62.97 seconds =============================================================== ERROR: InvocationError: '/Users/marc/dev/hg-repos/tox/.tox/py27/bin/py.test --junitxml=/Users/marc/dev/hg-repos/tox/.tox/py27/log/junit-py27.xml' ___________________________________________________________________________________ summary ____________________________________________________________________________________ ERROR: py27: commands failed ``` -- This is an issue notification from bitbucket.org. You are receiving this either because you are the owner of the issue, or you are following the issue. From commits-noreply at bitbucket.org Sun Dec 9 09:19:40 2012 From: commits-noreply at bitbucket.org (Bitbucket) Date: Sun, 09 Dec 2012 08:19:40 -0000 Subject: [py-svn] commit/pytest: hpk42: fixed versioning, thanks Arfrever Message-ID: <20121209081940.17190.58489@bitbucket22.managed.contegix.com> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/changeset/76aef493deec/ changeset: 76aef493deec user: hpk42 date: 2012-12-09 09:19:33 summary: fixed versioning, thanks Arfrever affected #: 2 files diff -r 4647d271406184af5b98137bdd67d8e33f282f88 -r 76aef493deeca96e22d1a37f6ad103f0db03b4fe _pytest/__init__.py --- a/_pytest/__init__.py +++ b/_pytest/__init__.py @@ -1,2 +1,2 @@ # -__version__ = '2.4.5dev3' +__version__ = '2.3.5dev5' diff -r 4647d271406184af5b98137bdd67d8e33f282f88 -r 76aef493deeca96e22d1a37f6ad103f0db03b4fe setup.py --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ name='pytest', description='py.test: simple powerful testing with Python', long_description = long_description, - version='2.4.5dev3', + version='2.3.5dev5', url='http://pytest.org', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Tue Dec 11 17:37:13 2012 From: issues-reply at bitbucket.org (James Laska) Date: Tue, 11 Dec 2012 16:37:13 -0000 Subject: [py-svn] [hpk42/pytest] Unexpected behavior when modifying parameterized value (issue #237) Message-ID: <4d8e7346b9a2d3cd60dc6a58857c8454@bitbucket.org> --- you can reply above this line --- New issue 237: Unexpected behavior when modifying parameterized value https://bitbucket.org/hpk42/pytest/issue/237/unexpected-behavior-when-modifying James Laska: Greetings, With py.test-2.3.4, when adjusting the value of a parameterized test function argument, it appears the changes are made to subsequent calls to the same function. With the following conftest.py ... ``` #!python import pytest releasevers = "6Server".split() basearchs = "i386 x86_64".split() clouds = "rhevm ec2".split() image_list = list() for releasever in releasevers: for basearch in basearchs: image_list.append(dict( name="rhel-{basearch}-{releasever}".format(releasever=releasever, basearch=basearch), profile="small-{basearch}".format(basearch=basearch), releasever=releasever, basearch=basearch)) def pytest_generate_tests(metafunc): if 'cloud' in metafunc.funcargnames: metafunc.parametrize("cloud", clouds) if 'image' in metafunc.funcargnames: metafunc.parametrize("image", image_list, ids=[i.get('name') for i in image_list]) ``` Any the following test_images.py ... ``` #!python def test_build(cloud, image): print "\n BEFORE: profile=%s" % (image.get('profile')) # If rhevm, alter the profile if cloud == 'rhevm' and image.get('basearch','') == 'i386': image['profile'] = 'small-x86_64' print " MODIFIED PROFILE" if cloud == 'rhevm': assert image.get('profile') == 'small-x86_64' else: assert image.get('profile') == 'small-%s' % image.get('basearch') ``` This may be something fundamental to python (call-by-reference) that I'm missing. However, it appears that py.test is adjusting the value of image['profile'] for subsequent calls to the test function. For example .. ``` py.test -s . ============================================================================================= test session starts ============================================================================================= platform linux2 -- Python 2.7.3 -- pytest-2.3.4 collected 4 items test_images.py BEFORE: profile=small-i386 MODIFIED PROFILE . BEFORE: profile=small-x86_64 . BEFORE: profile=small-x86_64 F BEFORE: profile=small-x86_64 . ================================================================================================== FAILURES =================================================================================================== ______________________________________________________________________________________ test_build[ec2-rhel-i386-6Server] ______________________________________________________________________________________ cloud = 'ec2', image = {'basearch': 'i386', 'name': 'rhel-i386-6Server', 'profile': 'small-x86_64', 'releasever': '6Server'} def test_build(cloud, image): print "\n BEFORE: profile=%s" % (image.get('profile')) # If rhevm, alter the profile if cloud == 'rhevm' and image.get('basearch','') == 'i386': image['profile'] = 'small-x86_64' print " MODIFIED PROFILE" if cloud == 'rhevm': assert image.get('profile') == 'small-x86_64' else: > assert image.get('profile') == 'small-%s' % image.get('basearch') E assert 'small-x86_64' == 'small-i386' E - small-x86_64 E + small-i386 test_images.py:13: AssertionError ===================================================================================== 1 failed, 3 passed in 0.02 seconds ====================================================================================== ``` If I first copy the test argument named 'image' using the 'copy.copy()' method, I am able to modify the object as needed without disruption to other generated calls to the same method. Please advise, is this a problem with pytest, or in how I'm generating the test arguments? -- This is an issue notification from bitbucket.org. You are receiving this either because you are the owner of the issue, or you are following the issue. From commits-noreply at bitbucket.org Tue Dec 11 20:17:51 2012 From: commits-noreply at bitbucket.org (Bitbucket) Date: Tue, 11 Dec 2012 19:17:51 -0000 Subject: [py-svn] commit/pytest: dusty: pocoo no longer has a pastebin service, so this section title is incorrect. Message-ID: <20121211191751.16855.92884@bitbucket25.managed.contegix.com> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/changeset/328e2be4acf4/ changeset: 328e2be4acf4 user: dusty date: 2012-12-11 20:04:12 summary: pocoo no longer has a pastebin service, so this section title is incorrect. affected #: 1 file diff -r 76aef493deeca96e22d1a37f6ad103f0db03b4fe -r 328e2be4acf4c5029e82e8f895aa11b050a61fde doc/en/usage.txt --- a/doc/en/usage.txt +++ b/doc/en/usage.txt @@ -133,7 +133,7 @@ .. _`PyPy-test`: http://buildbot.pypy.org/summary -Sending test report to pocoo pastebin service +Sending test report to online pastebin service ----------------------------------------------------- **Creating a URL for each test failure**:: Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Thu Dec 13 03:03:31 2012 From: issues-reply at bitbucket.org (Gustavo Picon) Date: Thu, 13 Dec 2012 02:03:31 -0000 Subject: [py-svn] [hpk42/pytest] Add an easy way for plugins to format objects for idmaker (issue #238) Message-ID: <26e7e446bb4d7a5bb89435a2b9ec3b03@bitbucket.org> --- you can reply above this line --- New issue 238: Add an easy way for plugins to format objects for idmaker https://bitbucket.org/hpk42/pytest/issue/238/add-an-easy-way-for-plugins-to-format Gustavo Picon: One of the things I missed when I ported a hacky dynamic unittest suite to pytest fixtures, was the information I got from the test names. I parametrize 6 different django models in every test, but in the report I saw something like: test_add_sibling_first[model0] test_add_sibling_first[model1] test_add_sibling_first[model2] ... Which wasn't helpful at all. I solved this problem by [monkeypatching _pytest.python.idmaker](https://bitbucket.org/tabo/django-treebeard/src/fd57de9692913126a31c87c909a45f84a919fffe/treebeard/tests/conftest.py?at=default#cl-20). Now I have [nicer results](https://tabo.pe/jenkins/job/django-treebeard/34/TOX_DB=sqlite,TOX_DJANGO=dj15,TOX_PYTHON=py32,os=windows/testReport/treebeard.tests.test_treebeard/TestAddSibling/), like: test_add_sibling_first[AL_TestNode] test_add_sibling_first[AL_TestNodeProxy] test_add_sibling_first[MP_TestNode] ... It would be better if pytest provided an interface for plugins to handle different object types, so for instance pytest_django could register itself as being in charge of formatting all django orm objects and views. Responsible: hpk42 -- This is an issue notification from bitbucket.org. You are receiving this either because you are the owner of the issue, or you are following the issue. From issues-reply at bitbucket.org Thu Dec 13 16:38:41 2012 From: issues-reply at bitbucket.org (Anonymous) Date: Thu, 13 Dec 2012 15:38:41 -0000 Subject: [py-svn] [hpk42/pytest] not collect deselected tests (issue #239) Message-ID: <22cda5f5443811ed83513f49f18559fa@bitbucket.org> --- you can reply above this line --- New issue 239: not collect deselected tests https://bitbucket.org/hpk42/pytest/issue/239/not-collect-deselected-tests Anonymous: Some tests can be generating multiple tests through ```@pytest.mark.parametrize()``` or ```metafunc.parametrize```, however if those tests are marked and specified not to run (through ```-m "not marker"``` command line argument) they are still collected first and then are deselected. In my specific case, one of ```@pytest.mark.parametrize()``` is generating around 500 tests - only to be deselected afterwards. This makes a long test even longer. Suggestion: to add an option **not to generate (or not to collect)** tests that are not required. Thanks! Responsible: hpk42 -- This is an issue notification from bitbucket.org. You are receiving this either because you are the owner of the issue, or you are following the issue. From issues-reply at bitbucket.org Sat Dec 15 21:52:28 2012 From: issues-reply at bitbucket.org (Takafumi Arakaki) Date: Sat, 15 Dec 2012 20:52:28 -0000 Subject: [py-svn] [hpk42/tox] distribute=False not working? (issue #76) Message-ID: --- you can reply above this line --- New issue 76: distribute=False not working? https://bitbucket.org/hpk42/tox/issue/76/distribute-false-not-working Takafumi Arakaki: I run `tox -v` and `pip install` was issued instead of `easy_install`. Checked with tox 1.4.2. >From quickly reading tox/_venv.py, it looks like `VirtualEnv.easy_install` is defined but `VirtualEnv._install` calls `VirtualEnv.pip_install` unconditionally. -- This is an issue notification from bitbucket.org. You are receiving this either because you are the owner of the issue, or you are following the issue. From commits-noreply at bitbucket.org Sun Dec 16 11:28:25 2012 From: commits-noreply at bitbucket.org (Bitbucket) Date: Sun, 16 Dec 2012 10:28:25 -0000 Subject: [py-svn] commit/pytest: 2 new changesets Message-ID: <20121216102825.9148.85013@bitbucket05.managed.contegix.com> 2 new commits in pytest: https://bitbucket.org/hpk42/pytest/changeset/06ad5978ad95/ changeset: 06ad5978ad95 user: hpk42 date: 2012-12-15 08:09:23 summary: add sentry affected #: 1 file diff -r 328e2be4acf4c5029e82e8f895aa11b050a61fde -r 06ad5978ad95ad3c5e096538e0e6beecb22f37d1 doc/en/projects.txt --- a/doc/en/projects.txt +++ b/doc/en/projects.txt @@ -8,6 +8,7 @@ * `PyPy `_, Python with a JIT compiler, running over `16000 tests `_ * the `MoinMoin `_ Wiki Engine +* `sentry `_, realtime app-maintenance and exception tracking * `tox `_, virtualenv/Hudson integration tool * `PIDA `_ framework for integrated development * `PyPM `_ ActiveState's package manager https://bitbucket.org/hpk42/pytest/changeset/410d8039f71a/ changeset: 410d8039f71a user: hpk42 date: 2012-12-16 11:28:17 summary: adding an example on how to do interact with the list of collected tests once before any tests are run affected #: 2 files diff -r 06ad5978ad95ad3c5e096538e0e6beecb22f37d1 -r 410d8039f71a7d1c6340ec7f12663dd23ac7a9e3 doc/en/example/index.txt --- a/doc/en/example/index.txt +++ b/doc/en/example/index.txt @@ -29,5 +29,6 @@ simple.txt parametrize.txt markers.txt + special.txt pythoncollection.txt nonpython.txt diff -r 06ad5978ad95ad3c5e096538e0e6beecb22f37d1 -r 410d8039f71a7d1c6340ec7f12663dd23ac7a9e3 doc/en/example/special.txt --- /dev/null +++ b/doc/en/example/special.txt @@ -0,0 +1,57 @@ + +A sesssion-fixture which can look at all collected tests +---------------------------------------------------------------- + +A session-scoped fixture effectively has access to all +collected test items. Here is an example of a fixture +function which walks all collected tests and looks +if their test class defines a ``callme`` method and +calls it:: + + # content of conftest.py + + import pytest + + @pytest.fixture(scope="session", autouse=True) + def callattr_ahead_of_alltests(request): + print "callattr_ahead_of_alltests called" + seen = set([None]) + session = request.node + for item in session.items: + instance = item.getparent(pytest.Instance) + if instance not in seen: + if hasattr(instance.obj, "callme"): + instance.obj.callme() + seen.add(instance) + +test classes may now define a ``callme`` method which +will be called ahead of running any tests:: + + # content of test_module.py + + class TestHello: + def callme(self): + print "callme called!" + + def test_method1(self): + print "test_method1 called" + + def test_method2(self): + print "test_method1 called" + + class TestOther: + def callme(self): + print "callme other called" + def test_other(self): + print "test other" + +If you run this without output capturing:: + + $ py.test -q -s test_module.py + ... + callattr_ahead_of_alltests called + callme called! + callme other called + test_method1 called + test_method1 called + test other Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Mon Dec 17 02:34:14 2012 From: issues-reply at bitbucket.org (Takayuki Shimizukawa) Date: Mon, 17 Dec 2012 01:34:14 -0000 Subject: [py-svn] [hpk42/tox] can't install new extras for target package (issue #77) Message-ID: <246f50187946078ef9fce4edd70e7eb6@bitbucket.org> --- you can reply above this line --- New issue 77: can't install new extras for target package https://bitbucket.org/hpk42/tox/issue/77/cant-install-new-extras-for-target-package Takayuki Shimizukawa: How do I install extras_require field's packages in test target? For example: * test target is "Sphinx". * The "Sphinx" in developing have `new` extras_require field in setup.py that name is "websupport". * If I install by hand, I'll invoke "pip install -e .[websupport]". In this case, `deps = sphinx[websupport]` in tox.ini will not bring the expected results because tox get "Sphinx" package from PyPI (not local test target), but "Sphinx" was uploaded at PyPI not have [websupport] extras_requires yet. -- This is an issue notification from bitbucket.org. You are receiving this either because you are the owner of the issue, or you are following the issue. From issues-reply at bitbucket.org Mon Dec 17 21:46:25 2012 From: issues-reply at bitbucket.org (1st1) Date: Mon, 17 Dec 2012 20:46:25 -0000 Subject: [py-svn] [hpk42/pytest] Namespace packages (python 3.3) support (issue #240) Message-ID: --- you can reply above this line --- New issue 240: Namespace packages (python 3.3) support https://bitbucket.org/hpk42/pytest/issue/240/namespace-packages-python-33-support 1st1: Currently there is a bug (latest py & pytest, python 3.3) with support of new namespace packages. Attached please find an example project. Please unpack it, Add top-level 'foo' dir to your 'PYTHONPATH', then 'cd' to the top-level foo and execute 'py.test -s'. The bug is that 'foo' is a namespace package (i.e. doesn't have an '__init__.py' file) and in this case, pytest loads 'foo.bar.spam' package TWO times, first as 'bar.spam' and secondly as 'foo.bar.spam'. This happens because py.path.local.LocalPath.pypkgpath explicitly checks for '__init__.py' files in packages, which fails for new namespaces semantics. -- This is an issue notification from bitbucket.org. You are receiving this either because you are the owner of the issue, or you are following the issue. From issues-reply at bitbucket.org Wed Dec 19 22:02:17 2012 From: issues-reply at bitbucket.org (Anonymous) Date: Wed, 19 Dec 2012 21:02:17 -0000 Subject: [py-svn] [hpk42/pytest] Allow for a forced xpass (issue #241) Message-ID: <493000470d1c86c74d104fe6a9ccbbaa@bitbucket.org> --- you can reply above this line --- New issue 241: Allow for a forced xpass https://bitbucket.org/hpk42/pytest/issue/241/allow-for-a-forced-xpass Anonymous: I have a test where I want to xfail on one environment only. I have wrapped the pytest.xfail in a condition so it will only xfail on that environment and if the assert were to fail, but it would be nice to be able to force an xpass if the assert were to pass. -- This is an issue notification from bitbucket.org. You are receiving this either because you are the owner of the issue, or you are following the issue. From issues-reply at bitbucket.org Thu Dec 20 14:56:29 2012 From: issues-reply at bitbucket.org (=?utf-8?q?Wojciech_Dani=C5=82o?=) Date: Thu, 20 Dec 2012 13:56:29 -0000 Subject: [py-svn] [hpk42/tox] Permission denied in Python 3.2 env (issue #78) Message-ID: <40a0ffc0706ffa9f65b11f1dc7a38750@bitbucket.org> --- you can reply above this line --- New issue 78: Permission denied in Python 3.2 env https://bitbucket.org/hpk42/tox/issue/78/permission-denied-in-python-32-env Wojciech Dani?o: Hi! When running tox with following tox.ini: ``` #!python [tox] envlist = py32 [testenv] changedir = tests deps = pytest commands= py.test \ [] ``` and a simple test file: ``` #!python import logging def test_simple(self): assert 1 == 1 ``` I get error: ``` #!python interface.py:1: in > import logging /usr/lib64/python3.2/logging/__init__.py:45: in > import threading ../.tox/py32/lib/python3.2/site-packages/_pytest/assertion/rewrite.py:141: in find_module > _make_rewritten_pyc(state, fn_pypath, pyc, co) ../.tox/py32/lib/python3.2/site-packages/_pytest/assertion/rewrite.py:226: in _make_rewritten_pyc > if _write_pyc(co, fn, proc_pyc): ../.tox/py32/lib/python3.2/site-packages/_pytest/assertion/rewrite.py:171: in _write_pyc > fp = open(pyc, "wb") E IOError: [Errno 13] Permission denied: '/usr/lib64/python3.2/__pycache__/threading.cpython-32-PYTEST.pyc.29938' ``` In python 2.7 everything works -- This is an issue notification from bitbucket.org. You are receiving this either because you are the owner of the issue, or you are following the issue. From issues-reply at bitbucket.org Thu Dec 20 16:47:28 2012 From: issues-reply at bitbucket.org (=?utf-8?q?Wojciech_Dani=C5=82o?=) Date: Thu, 20 Dec 2012 15:47:28 -0000 Subject: [py-svn] [hpk42/pytest] Error while importing overrided module (issue #242) Message-ID: --- you can reply above this line --- New issue 242: Error while importing overrided module https://bitbucket.org/hpk42/pytest/issue/242/error-while-importing-overrided-module Wojciech Dani?o: Hi! I'm creating a plugin manager system 'pluginmate' for Python (with ideas based on pyutilib pca and envisage). (you can find it here, but it is in early, development stage: https://github.com/wdanilo/pluginmate) When importing the main module, the sys.modules['pluginmate'] is overriden with a class instance. Maybe this is not beautifull, but it gives me some cool features. The problem is, when running tests, everything works if .pyc files are not generated. After they are generated I've got error. Full error stack can be found here: http://bpaste.net/show/65558 The problem does not exist after running tests the first time after changing the 'libs/utils/moduleUtils.py' file (the file responsible for overriding the module), so the error is connected with some kind of .pyc files caching by py.test -- This is an issue notification from bitbucket.org. You are receiving this either because you are the owner of the issue, or you are following the issue. From commits-noreply at bitbucket.org Sat Dec 29 00:18:24 2012 From: commits-noreply at bitbucket.org (Bitbucket) Date: Fri, 28 Dec 2012 23:18:24 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: adapt locations of ML to new @python.org location Message-ID: <20121228231824.14819.73760@bitbucket15.managed.contegix.com> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/changeset/e13c634309fd/ changeset: e13c634309fd user: hpk42 date: 2012-12-27 16:48:17 summary: adapt locations of ML to new @python.org location affected #: 1 file Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.