2 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/cf98811772af/ Changeset: cf98811772af User: bubenkoff Date: 2014-01-23 13:19:49 Summary: remove the github contribution section Affected #: 1 file
diff -r 0b1fb07d0f8fbe68e5dfe60a07ccdc689241e098 -r cf98811772af71b4ae1337a7990e1e36a6d7b3fb CONTRIBUTING.rst --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -134,40 +134,18 @@ branch: default -.. _contribution-on-github: -What about GitHub? ------------------- +.. _contribution-using-git: +What about git (and so GitHub)? +------------------------------- + +There used to be the pytest github mirror. It was removed in favor of this mercurial one, to remove confusion of people +not knowing where it's better to put their issues and pull requests. Also it wasn't easilily possible to automate +mirroring process. +However, it's still possible to use git to contribute to pytest using tools like https://github.com/buchuki/gitifyhg +which allow you to clone and work mercurial repo still using git. .. warning:: - Remember that GitHub is **not** a default development platform for py.test - and it doesn't include e.g. issue list. + Remember that git is **not** a default version control system py.test and you need to be careful using git + to work with it. -1. Fork the py.test `repository <https://github.com/hpk42/pytest/>`__ on GitHub. - -2. Create a local virtualenv (http://www.virtualenv.org/en/latest/):: - - $ virtualenv pytest-venv - $ cd pytest-venv/ - -3. Clone your fork locally:: - - $ git clone g...@github.com:your_name_here/pytest.git - -4. :ref:`Install your local copy into a virtualenv <installing-dev-pytest>` - and after that :ref:`test your changes <testing-pytest>`. - -5. Commit your changes and push to GitHub:: - - $ git branch <yourbranchname> - $ git checkout <yourbranchname> - $ git add . - $ git commit -am"<commit message>" - $ git push origin <yourbranchname> - -6. Submit a pull request through the GitHub website using the schema:: - - base fork: hpk42/pytest - base: master - - head fork: <your user>/pytest - compare: <yourbranchname> +Please read the manual carefully, and then use same contribution manual as for BitBucket. https://bitbucket.org/hpk42/pytest/commits/4e5babc67814/ Changeset: 4e5babc67814 User: bubenkoff Date: 2014-01-23 13:21:00 Summary: merge with mainline Affected #: 5 files diff -r cf98811772af71b4ae1337a7990e1e36a6d7b3fb -r 4e5babc678148d09b323969a39c6515503b6e5b8 .travis.yml --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,8 @@ # command to install dependencies install: "pip install -U detox" # # command to run tests -script: detox --recreate +script: detox --recreate -i ALL=https://devpi.net/hpk/dev/ + notifications: irc: - "chat.freenode.net#pytest-dev" diff -r cf98811772af71b4ae1337a7990e1e36a6d7b3fb -r 4e5babc678148d09b323969a39c6515503b6e5b8 CONTRIBUTING.rst --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -9,10 +9,23 @@ Types of contributions ====================== +Report bugs +----------- + +Report bugs at https://bitbucket.org/hpk42/pytest/issues. + +If you are reporting a bug, please include: + +* Your operating system name and version. +* Any details about your local setup that might be helpful in troubleshooting, + specifically Python interpreter version, + installed libraries and pytest version. +* Detailed steps to reproduce the bug. + Submit feedback for developers ------------------------------ -Do you like py.test? Share some love on Twitter or in your blog posts! +Do you like pytest? Share some love on Twitter or in your blog posts! We'd also like to hear about your propositions and suggestions. Feel free to `submit them as issues <https://bitbucket.org/hpk42/pytest/issues>`__ and: @@ -24,18 +37,6 @@ * If you have required skills and/or knowledge, we are very happy for pull requests (see below). -Report bugs ------------ - -Report bugs at https://bitbucket.org/hpk42/pytest/issues. - -If you are reporting a bug, please include: - -* Your operating system name and version. -* Any details about your local setup that might be helpful in troubleshooting, - specifically Python interpreter version, - installed libraries and py.test version. -* Detailed steps to reproduce the bug. Fix bugs -------- @@ -58,74 +59,75 @@ Write documentation ------------------- -py.test could always use more documentation. What exactly is needed? +pytest could always use more documentation. What exactly is needed? * More complementary documentation. Have you perhaps found something unclear? * Documentation translations. We currently have English and Japanese versions. * Docstrings. There's never too much of them. * Blog posts, articles and such -- they're all very appreciated. -Getting started for contributing -================================ +Preparing Pull Requests on Bitbucket +===================================== -The primary development platform for py.test is BitBucket. You can find all +The primary development platform for pytest is BitBucket. You can find all the issues there and submit pull requests. There is, however, a `GitHub mirror <https://github.com/hpk42/pytest/>`__ available, too, although it only allows for submitting pull requests. For a GitHub contribution guide look :ref:`below <contribution-on-github>`. -1. Fork the py.test `repository <https://bitbucket.org/hpk42/pytest>`__ on BitBucket. +1. Fork the `pytest bitbucket repository <https://bitbucket.org/hpk42/pytest>`__. It's fine to + use ``pytest`` as your fork repository name because it will live + under your user. -2. Create a local virtualenv (http://www.virtualenv.org/en/latest/):: +.. _virtualenvactivate: + +2. Create and activate a fork-specific virtualenv + (http://www.virtualenv.org/en/latest/):: $ virtualenv pytest-venv - $ cd pytest-venv/ - $ source bin/activate + $ source pytest-venv/bin/activate .. _checkout: -3. Clone your fork locally:: +3. Clone your fork locally and create a branch:: - $ hg clone ssh://h...@bitbucket.org/your_name_here/pytest - -.. _installing-dev-pytest: - -4. Install your local copy into a virtualenv:: - - $ cd pytest/ - $ python setup.py develop - - If that last command complains about not finding the required version - of "py" then you need to use the development pypi repository:: - - $ python setup.py develop -i http://pypi.testrun.org + $ hg clone ssh://h...@bitbucket.org/YOUR_BITBUCKET_USERNAME/pytest + $ cd pytest + $ hg branch <yourbranchname> .. _testing-pytest: -5. When you're done making changes, check that all of them pass all the tests - (including PEP8 and different Python interpreter versions). First install - ``tox``:: +4. You can now edit your local working copy. To test you need to + install the "tox" tool into your virtualenv:: $ pip install tox - You also need to have Python 2.7 and 3.3 available in your system. Now - running tests is as simple as issuing this one command:: + You need to have Python 2.7 and 3.3 available in your system. Now + running tests is as simple as issuing this command:: - $ tox -e py27,py33 + $ python runtox.py -e py27,py33,flakes - This command will run tests for both Python 2.7 and 3.3, which is a minimum - required to get your patch merged. To run whole test suit issue:: + This command will run tests via the "tox" tool against Python 2.7 and 3.3 + and also perform "flakes" coding-style checks. ``runtox.py`` is + a thin wrapper around ``tox`` which installs from a development package + index where newer (not yet released to pypi) versions of dependencies + (especially ``py``) might be present. - $ tox + To run tests on py27 and pass options (e.g. enter pdb on failure) + to pytest you can do:: -6. Commit your changes and push to BitBucket:: + $ python runtox.py -e py27 -- --pdb - $ hg branch <yourbranchname> - $ hg add . - $ hg commit -m"<commit message> + or to only run tests in a particular test module on py33:: + + $ python runtox.py -e py33 -- testing/test_config.py + +5. Commit and push once your tests pass and you are happy with your change(s):: + + $ hg commit -m"<commit message>" $ hg push -b . -7. Submit a pull request through the BitBucket website: +6. Finally, submit a pull request through the BitBucket website:: source: <your user>/pytest branch: <yourbranchname> diff -r cf98811772af71b4ae1337a7990e1e36a6d7b3fb -r 4e5babc678148d09b323969a39c6515503b6e5b8 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -962,6 +962,22 @@ >>> raises(ZeroDivisionError, "f(0)") <ExceptionInfo ...> + + Performance note: + ----------------- + + Similar to caught exception objects in Python, explicitly clearing local + references to returned ``py.code.ExceptionInfo`` objects can help the Python + interpreter speed up its garbage collection. + + Clearing those references breaks a reference cycle (``ExceptionInfo`` --> + caught exception --> frame stack raising the exception --> current frame + stack --> local variables --> ``ExceptionInfo``) which makes Python keep all + objects referenced from that cycle (including all local variables in the + current frame) alive until the next cyclic garbage collection run. See the + official Python ``try`` statement documentation for more detailed + information. + """ __tracebackhide__ = True if ExpectedException is AssertionError: diff -r cf98811772af71b4ae1337a7990e1e36a6d7b3fb -r 4e5babc678148d09b323969a39c6515503b6e5b8 doc/en/talks.txt --- a/doc/en/talks.txt +++ b/doc/en/talks.txt @@ -18,6 +18,9 @@ - `pytest introduction from Brian Okken (January 2013) <http://pythontesting.net/framework/pytest-introduction/>`_ +- `3-part blog series about pytest from Daniel Greenfeld (January + 2014) <http://pydanny.com/pytest-no-boilerplate-testing.html>`_ + - `pycon australia 2012 pytest talk from Brianna Laugher <http://2012.pycon-au.org/schedule/52/view_talk?day=sunday>`_ (`video <http://www.youtube.com/watch?v=DTNejE9EraI>`_, `slides <http://www.slideshare.net/pfctdayelise/funcargs-other-fun-with-pytest>`_, `code <https://gist.github.com/3386951>`_) - `pycon 2012 US talk video from Holger Krekel <http://www.youtube.com/watch?v=9LVqBQcFmyw>`_ diff -r cf98811772af71b4ae1337a7990e1e36a6d7b3fb -r 4e5babc678148d09b323969a39c6515503b6e5b8 runtox.py --- /dev/null +++ b/runtox.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python + +import subprocess +import sys + +if __name__ == "__main__": + subprocess.call(["tox", + "-i", "ALL=https://devpi.net/hpk/dev/", + "--develop",] + sys.argv[1:]) + 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. _______________________________________________ pytest-commit mailing list pytest-commit@python.org https://mail.python.org/mailman/listinfo/pytest-commit