--- you can reply above this line --- New issue 281: pytest object has no attribute 'main' https://bitbucket.org/hpk42/pytest/issue/281/pytest-object-has-no-attribute-main
Jason Lee: I copied the code in pytest usage.html#pytest-main-usage as followed: import pytest class MyPlugin: def pytest_sessionfinish(self): print("*** test run reporting finishing") pytest.main("-qq", plugins=[MyPlugin()]) into a file named mytest_1.py and then execute "python mytest_1.py" I got the result: **Traceback (most recent call last): File "mytest_1.py", line 7, in <module> pytest.main("-qq", plugins=[MyPlugin()]) AttributeError: 'module' object has no attribute 'main'** and the expected is: *** test run reporting finishing py.test information :py.test version 2.3.4, imported from /usr/local/lib/python2.7/site-packages/pytest.pyc python information:Python 2.7.3 system information:Linux 2.6.32.16-141.1.x86_64 #1 SMP Wed Jul 14 22:04:02 CST 2010 x86_64 x86_64 x86_64 GNU/Linux 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. _______________________________________________ pytest-commit mailing list pytest-commit@python.org http://mail.python.org/mailman/listinfo/pytest-commit