.. Welcome to pytest! ============================================= Pytest ã¸ããããï¼ =================== .. - **a mature full-featured testing tool** - runs on Posix/Windows, Python 2.4-3.2, PyPy and Jython-2.5.1 - :ref:`comprehensive online <toc>` and `PDF documentation <pytest.pdf>`_ - continuously `tested on many Python interpreters <http://hudson.testrun.org/view/pytest/job/pytest/>`_ - used in :ref:`many projects and organisations <projects>`, in test suites ranging from 10 to 10s of thousands of tests - comes with many :ref:`tested examples <examples>` - supports :ref:`good integration practises <goodpractises>` - **é·ãééçºãããå ¨ã¦ã®æ©è½ãåãããã¹ããã¼ã«** - Posix/Windows, Python 2.4-3.2, PyPy, Jython 2.5.1 ã«å¯¾å¿ - :ref:`å æ¬çãªãªã³ã©ã¤ã³ããã¥ã¡ã³ã <toc>` 㨠`PDF ããã¥ã¡ã³ã <pytest.pdf>`_ - ç¶ç¶çã« `å¤ãã® Python ã¤ã³ã¿ã¼ããªã¿ã¼ã§ãã¹ã <http://hudson.testrun.org/view/pytest/job/pytest/>`_ - :ref:`æ§ã ãªããã¸ã§ã¯ãã¨çµç¹ <projects>` ã®ãæ°ä¸ãã®å¹ åºããã¹ãã¹ã¤ã¼ãã§å©ç¨ - å¤ãã® :ref:`ãã¹ããµã³ãã« <examples>` ãä»å± - :ref:`åªããã¤ã³ãã°ã¬ã¼ã·ã§ã³ãã©ã¯ãã£ã¹ <goodpractises>` ã«å¯¾å¿ .. - **provides no-boilerplate testing** - makes it :ref:`easy to get started <getstarted>`, - refined :ref:`usage options <usage>` - :ref:`assert with the assert statement` - helpful :ref:`traceback and failing assertion reporting <tbreportdemo>` - allows :ref:`print debugging <printdebugging>` and :ref:`the capturing of standard output during test execution <captures>` - supports :pep:`8` compliant coding styles in tests - **ãã¤ã©ã¼ãã¬ã¼ã (ã²ãªå½¢) ã®ãããªããã¹ããæä¾** - :ref:`ç°¡åã«å§ãããã <getstarted>` - æ´ç·´ããã :ref:`ãªãã·ã§ã³ã®ä½¿ãæ¹ <usage>` - :ref:`assert with the assert statement` - åããããã :ref:`ãã¬ã¼ã¹ããã¯ã¨å¤±ææã®ã¬ãã¼ã <tbreportdemo>` - :ref:`print ãããã° <printdebugging>` 㨠:ref:`ãã¹ãå®è¡æã®æ¨æºåºåã®ãã£ãã㣠<captures>` - ãã¹ãã®ã³ã¼ãã£ã³ã°ã¹ã¿ã¤ã«ã :pep:`8` æºæ ã«å¯¾å¿ .. - **supports functional testing and complex test setups** - (new in 2.2) :ref:`durations` - (much improved in 2.2) :ref:`marking and test selection <mark>` - (improved in 2.2) :ref:`parametrized test functions <parametrized test functions>` - advanced :ref:`skip and xfail` - unique :ref:`dependency injection through funcargs <funcargs>` - can :ref:`distribute tests to multiple CPUs <xdistcpu>` through :ref:`xdist plugin <xdist>` - can :ref:`continuously re-run failing tests <looponfailing>` - many :ref:`builtin helpers <pytest helpers>` - flexible :ref:`Python test discovery` - **æ©è½ãã¹ãã¨è¤éãªãã¹ãã®ã»ããã¢ãã** - (2.2 ã®æ°æ©è½) :ref:`durations` - (2.2 ã§ããªãæ¹å) :ref:`ãã¼ãã³ã°ã¨ãã¹ãé¸æ <mark>` - (2.2 ã§æ¹å) :ref:`ãã©ã¡ã¼ã¿ã¼ãã¹ãæ©è½ <parametrized test functions>` - :ref:`skip and xfail` - ã¦ãã¼ã¯ãª :ref:`funcargs ãç¨ããä¾åæ§ã®æ³¨å ¥ <funcargs>` - :ref:`xdist ãã©ã°ã¤ã³ <xdist>` ãç¨ãã :ref:`è¤æ° CPU ã«å¯¾ããåæ£ãã¹ã <xdistcpu>` - :ref:`失æãããã¹ãã®ã¿ãç¶ç¶çã«åå®è¡ <looponfailing>` - å¤ãã® :ref:`çµã¿è¾¼ã¿ãã«ãã¼æ©è½ <pytest helpers>` - æè»ãª :ref:`Python test discovery` .. - **integrates many common testing methods** - can integrate ``nose``, ``unittest.py`` and ``doctest.py`` style tests, including running testcases made for Django and trial - supports extended :ref:`xUnit style setup <xunitsetup>` - supports domain-specific :ref:`non-python tests` - supports the generation of testing coverage reports - `Javascript unit- and functional testing`_ - **å¤ãã®å ±éãã¹ãã¡ã½ãããçµ±å** - ``nose``, ``unittest.py``, ``doctest.py`` ã¹ã¿ã¤ã«ã®ãã¹ããDjango ã®ãã¹ãã©ã³ãã¼ (試ä½æ®µé) - :ref:`xUnit ã¹ã¿ã¤ã«ã® setup <xunitsetup>` ã®æ¡å¼µ - ãã¡ã¤ã³åºæã® :ref:`non-python tests` - ãã¹ãã«ãã¬ãã¸ã¬ãã¼ãã®çæ - `Javascript ã®ã¦ããã/æ©è½ãã¹ã <Javascript unit- and functional testing>`_ .. - **extensive plugin and customization system** - all collection, reporting, running aspects are delegated to hook functions - customizations can be per-directory, per-project or per PyPI released plugins - it is easy to add command line options or do other kind of add-ons and customizations. - **è±å¯ãªãã©ã°ã¤ã³ã¨ã«ã¹ã¿ãã¤ãºã®ä»çµã¿** - å ¨ã¦ã®ã³ã¬ã¯ã·ã§ã³ãã¬ãã¼ããå®è¡ç¶æ ãããã¯é¢æ°ã«å§è² - ãã£ã¬ã¯ããªåä½ãããã¸ã§ã¯ãåä½ãPyPI ã§ãªãªã¼ã¹ããããã©ã°ã¤ã³åä½ã§ã®ã«ã¹ã¿ãã¤ãº - ã³ãã³ãã©ã¤ã³ãªãã·ã§ã³ã追å ãããããã®ä»ã®ã¢ããªã³ãã«ã¹ã¿ãã¤ãºãç°¡å .. _`Javascript unit- and functional testing`: http://pypi.python.org/pypi/oejskit .. _`easy`: http://bruynooghe.blogspot.com/2009/12/skipping-slow-test-by-default-in-pytest.html