1:orphan: 2 3.. warnings about this file not being included in any toctree will be suppressed by :orphan: 4 5 6April 2015 is "adopt pytest month" 7============================================= 8 9Are you an enthusiastic pytest user, the local testing guru in your workplace? Or are you considering using pytest for your open source project, but not sure how to get started? Then you may be interested in "adopt pytest month"! 10 11We will pair experienced pytest users with open source projects, for a month's effort of getting new development teams started with pytest. 12 13In 2015 we are trying this for the first time. In February and March 2015 we will gather volunteers on both sides, in April we will do the work, and in May we will evaluate how it went. This effort is being coordinated by Brianna Laugher. If you have any questions or comments, you can raise them on the `@pytestdotorg twitter account <https://twitter.com/pytestdotorg>`_ the `issue tracker`_ or the `pytest-dev mailing list`_. 14 15 16.. _`issue tracker`: https://github.com/pytest-dev/pytest/issues/676 17.. _`pytest-dev mailing list`: https://mail.python.org/mailman/listinfo/pytest-dev 18 19 20The ideal pytest helper 21----------------------------------------- 22 23 - will be able to commit 2-4 hours a week to working with their particular project (this might involve joining their mailing list, installing the software and exploring any existing tests, offering advice, writing some example tests) 24 - feels confident in using pytest (e.g. has explored command line options, knows how to write parametrized tests, has an idea about conftest contents) 25 - does not need to be an expert in every aspect! 26 27`Pytest helpers, sign up here`_! (preferably in February, hard deadline 22 March) 28 29 30.. _`Pytest helpers, sign up here`: http://goo.gl/forms/nxqAhqWt1P 31 32 33The ideal partner project 34----------------------------------------- 35 36 - is open source, and predominantly written in Python 37 - has an automated/documented install process for developers 38 - has more than one core developer 39 - has at least one official release (e.g. is available on pypi) 40 - has the support of the core development team, in trying out pytest adoption 41 - has no tests... or 100% test coverage... or somewhere in between! 42 43`Partner projects, sign up here`_! (by 22 March) 44 45 46.. _`Partner projects, sign up here`: http://goo.gl/forms/ZGyqlHiwk3 47 48 49What does it mean to "adopt pytest"? 50----------------------------------------- 51 52There can be many different definitions of "success". Pytest can run many `nose and unittest`_ tests by default, so using pytest as your testrunner may be possible from day 1. Job done, right? 53 54Progressive success might look like: 55 56 - tests can be run (by pytest) without errors (there may be failures) 57 - tests can be run (by pytest) without failures 58 - test runner is integrated into CI server 59 - existing tests are rewritten to take advantage of pytest features - this can happen in several iterations, for example: 60 - changing to native assert_ statements (pycmd_ has a script to help with that, ``pyconvert_unittest.py``) 61 - changing `setUp/tearDown methods`_ to fixtures_ 62 - adding markers_ 63 - other changes to reduce boilerplate 64 - assess needs for future tests to be written, e.g. new fixtures, distributed_ testing tweaks 65 66"Success" should also include that the development team feels comfortable with their knowledge of how to use pytest. In fact this is probably more important than anything else. So spending a lot of time on communication, giving examples, etc will probably be important - both in running the tests, and in writing them. 67 68It may be after the month is up, the partner project decides that pytest is not right for it. That's okay - hopefully the pytest team will also learn something about its weaknesses or deficiencies. 69 70.. _`nose and unittest`: faq.html#how-does-pytest-relate-to-nose-and-unittest 71.. _assert: asserts.html 72.. _pycmd: https://bitbucket.org/hpk42/pycmd/overview 73.. _`setUp/tearDown methods`: xunit_setup.html 74.. _fixtures: fixture.html 75.. _markers: markers.html 76.. _distributed: xdist.html 77 78 79Other ways to help 80----------------------------------------- 81 82Promote! Do your favourite open source Python projects use pytest? If not, why not tell them about this page? 83