From f555a3a76cc205b0f0d2b253d0146290e7ca34cf Mon Sep 17 00:00:00 2001 From: Cyrus Maden Date: Mon, 15 Jan 2018 13:27:10 -0800 Subject: [PATCH] Update getting started guide Proofread; added intro paragraph under first header to orient new users; fixed grammar errors (switched to active voice, actionable directions, etc) to improve readability --- .DS_Store | Bin 0 -> 6148 bytes doc/.DS_Store | Bin 0 -> 6148 bytes doc/en/.DS_Store | Bin 0 -> 6148 bytes doc/en/getting-started.rst | 14 +++++--------- 4 files changed, 5 insertions(+), 9 deletions(-) create mode 100644 .DS_Store create mode 100644 doc/.DS_Store create mode 100644 doc/en/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..7cbe275046a42350e05301fa3e51caa9dcc81710 GIT binary patch literal 6148 zcmeH~Jr2S!425ml0g0s}V-^m;4I%_5-~tFbB6UFQIXcfj3xyd~=vlJA*s0a_4NWZ~ zdU%d|kwHY(aHH%j%uJDYGRh>k@o~Ffr|E7bw^h;#@Ihw#xlK?3DnJFO02QDD3sN8t z^7Upx&%{Te0#slb3fT9dz>PK8g8u11@DTv)QFg=HX9=)a0j$XuLtMpWxr-|5*!DDnJGPOabkW z=i>n{m1pb6>skGhRa-YW=$9kB{RAMfqj(EA!;KrJ4LH~3h_y_>bP3Z5S>vG!N$@uSMUZw^aLJ2(QSkU3$fqIb9pr1d;e&iX;6Vd)od{|=!lohtBGA;&_%QP(7ai*Ls7pS=NC^Gt$`e=02O#vU>M7p)&Dj8 zP5=K);))7Tfxl8fN2|?hi6>=k?LE$FZGrFLmUDxfVeS+RUXFoYjlb| WP3!`lj=0l-{24G^XjI_a3fut+K^1ra literal 0 HcmV?d00001 diff --git a/doc/en/getting-started.rst b/doc/en/getting-started.rst index d4847d59b..3c6391c6a 100644 --- a/doc/en/getting-started.rst +++ b/doc/en/getting-started.rst @@ -15,7 +15,7 @@ Installation and Getting Started ``pytest`` is a framework that makes building simple and scalable tests easy. Tests are expressive and readable—no boilerplate code required. Get started in minutes with a small unit test or complex functional test for your application or library. .. _`getstarted`: -.. _`installpytest`: +.. _`installation`: Install ``pytest`` ---------------------------------------- @@ -29,7 +29,7 @@ Install ``pytest`` $ pytest --version This is pytest version 3.x.y, imported from $PYTHON_PREFIX/lib/python3.5/site-packages/pytest.py -.. _`createyourfirsttest`: +.. _`simpletest`: Create your first test ---------------------------------------------------------- @@ -68,11 +68,7 @@ This test returns a failure report because ``func(3)`` does not return ``5``. .. note:: - You can use the ``assert`` statement to verify test expectations. pytest’s :ref:`Advanced assertion introspection` will intelligently report intermediate values of the assert expression so you can avoid the many names `of JUnit legacy methods`_. - -.. _`JUnit legacy methods`: http://docs.python.org/library/unittest.html#test-cases - -.. _`Advanced assertion introspection`: http://docs.python.org/reference/simple_stmts.html#the-assert-statement + You can use the ``assert`` statement to verify test expectations. pytest’s `Advanced assertion introspection `_ will intelligently report intermediate values of the assert expression so you can avoid the many names `of JUnit legacy methods `_. Run multiple tests ---------------------------------------------------------- @@ -115,7 +111,7 @@ Once you develop multiple tests, you may want to group them into a class. pytest x = "hello" assert hasattr(x, 'check') -``pytest`` discovers all tests following its :ref:`Conventions for Python test discovery `, so it finds both ``test_`` prefixed functions. There is no need to subclass anything. We can simply run the module by passing its filename: +``pytest`` discovers all tests following its :ref:`Conventions for Python test discovery `, so it finds both ``test_`` prefixed functions. There is no need to subclass anything. We can simply run the module by passing its filename:: $ pytest -q test_class.py .F [100%] @@ -138,7 +134,7 @@ The first test passed and the second failed. You can easily see the intermediate Request a unique temporary directory for functional tests -------------------------------------------------------------- -``pytest`` provides `Builtin fixtures/function arguments `_ to request arbitrary resources, like a unique temporary directory: +``pytest`` provides `Builtin fixtures/function arguments `_ to request arbitrary resources, like a unique temporary directory:: # content of test_tmpdir.py def test_needsfiles(tmpdir):