From 05a1b4a37df7e855747f66174a472b0de3ce1c9e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 1 Jul 2011 02:08:03 -0400 Subject: - The Wiki2 tutorial "Tests" chapter had two bugs: it did not tell the user to depend on WebTest, and 2 tests failed as the result of changes to Pyramid itself. These issues have been fixed. --- docs/tutorials/wiki2/tests.rst | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 7a4e65529..8acf0d761 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -48,8 +48,17 @@ Running the Tests ================= We can run these tests by using ``setup.py test`` in the same way we did in -:ref:`running_tests`. Assuming our shell's current working directory is the -"tutorial" distribution directory: +:ref:`running_tests`. However, first we must edit our ``setup.py`` to +include a dependency on WebTest, which we've used in our ``tests.py``. +Change the ``requires`` list in ``setup.py`` to include ``WebTest``. + +.. literalinclude:: src/tests/setup.py + :linenos: + :language: python + :lines: 10-19 + +After we've added a dependency on WebTest in ``setup.py``, assuming our +shell's current working directory is the "tutorial" distribution directory: On UNIX: -- cgit v1.2.3 From 231f532746ceb64138448a722d97d2f49fa0030d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 1 Jul 2011 02:17:53 -0400 Subject: run setup.py develop --- docs/tutorials/wiki2/tests.rst | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 8acf0d761..c120b1c61 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -57,8 +57,25 @@ Change the ``requires`` list in ``setup.py`` to include ``WebTest``. :language: python :lines: 10-19 -After we've added a dependency on WebTest in ``setup.py``, assuming our -shell's current working directory is the "tutorial" distribution directory: +After we've added a dependency on WebTest in ``setup.py``, we need to rerun +``setup.py develop`` to get WebTest installed into our virtualenv. Assuming +our shell's current working directory is the "tutorial" distribution +directory: + +On UNIX: + +.. code-block:: text + + $ ../bin/python setup.py develop + +On Windows: + +.. code-block:: text + + c:\pyramidtut\tutorial> ..\Scripts\python setup.py develop + +Once that command has completed successfully, we can run the tests +themselves: On UNIX: -- cgit v1.2.3 From 8092b61b4704bc3a374f5c15e6e626612d9eb504 Mon Sep 17 00:00:00 2001 From: Chris Shenton Date: Mon, 7 Nov 2011 17:57:57 -0800 Subject: Remove 'pyramid_' from scaffolding name used for pcreate now. --- docs/tutorials/wiki2/tests.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index c120b1c61..d0027d2f8 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -13,7 +13,7 @@ We write a test class for the model class ``Page`` and another test class for the ``initialize_sql`` function. To do so, we'll retain the ``tutorial.tests.ViewTests`` class provided as a -result of the ``pyramid_routesalchemy`` project generator. We'll add two +result of the ``routesalchemy`` project generator. We'll add two test classes: one for the ``Page`` model named ``PageModelTests``, one for the ``initialize_sql`` function named ``InitializeSqlTests``. -- cgit v1.2.3 From 818f8cab1dff781bbacf94cbabb4bec3825e081e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 12 Nov 2011 20:41:29 -0500 Subject: - The ``alchemy`` scaffold has been removed. - The ``routesalchemy`` scaffold has been renamed ``alchemy``. --- docs/tutorials/wiki2/tests.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index d0027d2f8..8fa8ea3ae 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -13,9 +13,9 @@ We write a test class for the model class ``Page`` and another test class for the ``initialize_sql`` function. To do so, we'll retain the ``tutorial.tests.ViewTests`` class provided as a -result of the ``routesalchemy`` project generator. We'll add two -test classes: one for the ``Page`` model named ``PageModelTests``, one for the -``initialize_sql`` function named ``InitializeSqlTests``. +result of the ``alchemy`` scaffold. We'll add two test classes: one for the +``Page`` model named ``PageModelTests``, one for the ``initialize_sql`` +function named ``InitializeSqlTests``. Testing the Views ================= -- cgit v1.2.3 From 5edd54f05b05330fa6e899a1bb1650cc7a2df33c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 27 Nov 2011 04:08:20 -0500 Subject: - The SQLAlchemy Wiki tutorial has been updated. It now uses ``@view_config`` decorators and an explicit database population script. Closes #359. --- docs/tutorials/wiki2/tests.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 8fa8ea3ae..25cf2c25e 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -14,8 +14,8 @@ for the ``initialize_sql`` function. To do so, we'll retain the ``tutorial.tests.ViewTests`` class provided as a result of the ``alchemy`` scaffold. We'll add two test classes: one for the -``Page`` model named ``PageModelTests``, one for the ``initialize_sql`` -function named ``InitializeSqlTests``. +``Page`` model named ``PageModelTests``, and one for the ``populate`` script +named ``Test_populate``. Testing the Views ================= -- cgit v1.2.3 From 4ded431cba6729e5f2ac1879df735905006555ac Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 4 Jan 2012 19:02:04 -0500 Subject: remove dependency on pysqlite from all scaffolding on platforms lt 2.6 --- docs/tutorials/wiki2/tests.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 25cf2c25e..92544404c 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -55,7 +55,7 @@ Change the ``requires`` list in ``setup.py`` to include ``WebTest``. .. literalinclude:: src/tests/setup.py :linenos: :language: python - :lines: 10-19 + :lines: 9-20 After we've added a dependency on WebTest in ``setup.py``, we need to rerun ``setup.py develop`` to get WebTest installed into our virtualenv. Assuming -- cgit v1.2.3 From 1e5ba8a07c583073f1d885156c92a266ceb8dce9 Mon Sep 17 00:00:00 2001 From: Chris Shenton Date: Tue, 13 Mar 2012 15:56:42 -0700 Subject: Show modification to scripts/populate.py to accept memory DB URI The text didn't describe editing the populate.py to accept an optional ``settings`` argument, which _callFUT() in tests.py passed in. This is used to specify a memory-backed SQLite DB which we can wipe-n-load during testing. Show how to replace main() in populate.py per our source code to accept this argument, and use it to set the DB URI; it also uses our Page model. --- docs/tutorials/wiki2/tests.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 92544404c..94d97d2d5 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -34,6 +34,18 @@ tested in the unit tests, like logging in, logging out, checking that the ``viewer`` user cannot add or edit pages, but the ``editor`` user can, and so on. +We must first modify ``main()`` in ``scripts/populate.py``, adding an +optional ``settings`` argument so we can pass in a URI to a +memory-resident database instead of our disk-based database we've +populated; this allows us to run our tests with a clean database each +time. Replace ``main()`` with this version which adds an argument and +then uses it if set, and creates a ``Model`` for testing: + +.. literalinclude:: src/tests/tutorial/scripts/populate.py + :lines: 24-36 + :linenos: + :language: python + Viewing the results of all our edits to ``tests.py`` ==================================================== -- cgit v1.2.3 From 58df8cb0697a00f88da347db8c09f7c0148f99c0 Mon Sep 17 00:00:00 2001 From: Patricio Paez Date: Wed, 14 Mar 2012 13:58:17 -0700 Subject: Removed populate tests from the SQL wiki tutorial - Removed the main() settings parameter in populate.py - Updated the Tests chapter --- docs/tutorials/wiki2/tests.rst | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 94d97d2d5..92544404c 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -34,18 +34,6 @@ tested in the unit tests, like logging in, logging out, checking that the ``viewer`` user cannot add or edit pages, but the ``editor`` user can, and so on. -We must first modify ``main()`` in ``scripts/populate.py``, adding an -optional ``settings`` argument so we can pass in a URI to a -memory-resident database instead of our disk-based database we've -populated; this allows us to run our tests with a clean database each -time. Replace ``main()`` with this version which adds an argument and -then uses it if set, and creates a ``Model`` for testing: - -.. literalinclude:: src/tests/tutorial/scripts/populate.py - :lines: 24-36 - :linenos: - :language: python - Viewing the results of all our edits to ``tests.py`` ==================================================== -- cgit v1.2.3 From c884eea0abeac00fdff6821329c2981caa5c8db4 Mon Sep 17 00:00:00 2001 From: Patricio Paez Date: Wed, 14 Mar 2012 14:58:05 -0700 Subject: Renamed db populate to initialize in SQL tutorial - Replaced populate_tutorial -> initialize_tutorial_db - Renamed populate.py -> initializedb.py - Updated references in the documenation --- docs/tutorials/wiki2/tests.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 92544404c..86880fb18 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -13,9 +13,8 @@ We write a test class for the model class ``Page`` and another test class for the ``initialize_sql`` function. To do so, we'll retain the ``tutorial.tests.ViewTests`` class provided as a -result of the ``alchemy`` scaffold. We'll add two test classes: one for the -``Page`` model named ``PageModelTests``, and one for the ``populate`` script -named ``Test_populate``. +result of the ``alchemy`` scaffold. We'll add a test class named +``PageModelTests`` for the ``Page`` model. Testing the Views ================= -- cgit v1.2.3 From b3e608bac815a7d3fc639d78ec38edc5f97df859 Mon Sep 17 00:00:00 2001 From: Doug Latornell Date: Sat, 17 Mar 2012 09:27:13 -0700 Subject: Improve text of SQLAlchemy wiki tutorial. A mixture of typo fixes and wording improvements. --- docs/tutorials/wiki2/tests.rst | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 86880fb18..f42eb0abe 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -4,31 +4,30 @@ Adding Tests We will now add tests for the models and the views and a few functional tests in the ``tests.py``. Tests ensure that an application works, and -that it continues to work after some changes are made in the future. +that it continues to work after changes are made in the future. Testing the Models ================== -We write a test class for the model class ``Page`` and another test class -for the ``initialize_sql`` function. - -To do so, we'll retain the ``tutorial.tests.ViewTests`` class provided as a -result of the ``alchemy`` scaffold. We'll add a test class named -``PageModelTests`` for the ``Page`` model. +To test the model class ``Page`` we'll add a new ``PageModelTests`` +class to our ``tests.py`` file that was generated as part of the +``alchemy`` scaffold. Testing the Views ================= -We'll modify our ``tests.py`` file, adding tests for each view function we -added above. As a result, we'll *delete* the ``ViewTests`` test in the file, -and add four other test classes: ``ViewWikiTests``, ``ViewPageTests``, -``AddPageTests``, and ``EditPageTests``. These test the ``view_wiki``, -``view_page``, ``add_page``, and ``edit_page`` views respectively. +We'll modify our ``tests.py`` file, adding tests for each view +function we added above. As a result, we'll *delete* the +``ViewTests`` class that the ``alchemy`` scaffold provided, and add +four other test classes: ``ViewWikiTests``, ``ViewPageTests``, +``AddPageTests``, and ``EditPageTests``. These test the +``view_wiki``, ``view_page``, ``add_page``, and ``edit_page`` views +respectively. Functional tests ================ -We test the whole application, covering security aspects that are not +We'll test the whole application, covering security aspects that are not tested in the unit tests, like logging in, logging out, checking that the ``viewer`` user cannot add or edit pages, but the ``editor`` user can, and so on. @@ -36,8 +35,7 @@ can, and so on. Viewing the results of all our edits to ``tests.py`` ==================================================== -Once we're done with the ``tests.py`` module, it will look a lot like the -below: +Once we're done with the ``tests.py`` module, it will look a lot like: .. literalinclude:: src/tests/tutorial/tests.py :linenos: @@ -55,6 +53,7 @@ Change the ``requires`` list in ``setup.py`` to include ``WebTest``. :linenos: :language: python :lines: 9-20 + :emphasize-lines: 19 After we've added a dependency on WebTest in ``setup.py``, we need to rerun ``setup.py develop`` to get WebTest installed into our virtualenv. Assuming @@ -88,12 +87,12 @@ On Windows: c:\pyramidtut\tutorial> ..\Scripts\python setup.py test -q -The expected result looks something like: +The expected result ends something like: .. code-block:: text ...................... ---------------------------------------------------------------------- - Ran 22 tests in 2.700s + Ran 21 tests in 2.700s OK -- cgit v1.2.3 From ef501bb1618e12ec9f0a57ba5cf873616f7c440a Mon Sep 17 00:00:00 2001 From: Doug Latornell Date: Sat, 17 Mar 2012 10:12:34 -0700 Subject: Fix typos. --- docs/tutorials/wiki2/tests.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index f42eb0abe..f8dbb0f18 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -53,7 +53,7 @@ Change the ``requires`` list in ``setup.py`` to include ``WebTest``. :linenos: :language: python :lines: 9-20 - :emphasize-lines: 19 + :emphasize-lines: 10 After we've added a dependency on WebTest in ``setup.py``, we need to rerun ``setup.py develop`` to get WebTest installed into our virtualenv. Assuming -- cgit v1.2.3 From c5675c6c42ce37625ec4f15880899f7b1f276ef3 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 17 Mar 2012 13:44:16 -0400 Subject: add link to tests source --- docs/tutorials/wiki2/tests.rst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index f8dbb0f18..6a7cbf62d 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -6,6 +6,11 @@ We will now add tests for the models and the views and a few functional tests in the ``tests.py``. Tests ensure that an application works, and that it continues to work after changes are made in the future. +The source code for this tutorial stage can be browsed at +`http://github.com/Pylons/pyramid/tree/1.3-branch/docs/tutorials/wiki2/src/tests/ +`_. + + Testing the Models ================== -- cgit v1.2.3 From 445eb8708fa48209947377f6de609799dd843ad6 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Sun, 20 Jan 2013 17:10:40 +0200 Subject: point to the sources of the wiki tutorials in just one location; fix #763 * This avoids having to update the link multiple times. * Also, mention their location, in case user has Pyramid checkout. --- docs/tutorials/wiki2/tests.rst | 3 --- 1 file changed, 3 deletions(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 6a7cbf62d..83df86b27 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -6,9 +6,6 @@ We will now add tests for the models and the views and a few functional tests in the ``tests.py``. Tests ensure that an application works, and that it continues to work after changes are made in the future. -The source code for this tutorial stage can be browsed at -`http://github.com/Pylons/pyramid/tree/1.3-branch/docs/tutorials/wiki2/src/tests/ -`_. Testing the Models -- cgit v1.2.3 From eb3cee262ef52480198fc7f506debe0f35e3554a Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Mon, 4 Mar 2013 22:30:32 +0200 Subject: fix #311 --- docs/tutorials/wiki2/tests.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 83df86b27..7aa3c464d 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -54,7 +54,7 @@ Change the ``requires`` list in ``setup.py`` to include ``WebTest``. .. literalinclude:: src/tests/setup.py :linenos: :language: python - :lines: 9-20 + :lines: 11-21 :emphasize-lines: 10 After we've added a dependency on WebTest in ``setup.py``, we need to rerun -- cgit v1.2.3 From f73f0e332658fac2583f51247dcd49bd36d63ce4 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Wed, 13 Mar 2013 23:05:17 +0200 Subject: consistency: use $VENV whenever virtualenv binaries are used --- docs/tutorials/wiki2/tests.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 7aa3c464d..33b5d35c1 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -66,13 +66,13 @@ On UNIX: .. code-block:: text - $ ../bin/python setup.py develop + $ $VENV/bin/python setup.py develop On Windows: .. code-block:: text - c:\pyramidtut\tutorial> ..\Scripts\python setup.py develop + c:\pyramidtut\tutorial> %VENV%\Scripts\python setup.py develop Once that command has completed successfully, we can run the tests themselves: @@ -81,13 +81,13 @@ On UNIX: .. code-block:: text - $ ../bin/python setup.py test -q + $ $VENV/bin/python setup.py test -q On Windows: .. code-block:: text - c:\pyramidtut\tutorial> ..\Scripts\python setup.py test -q + c:\pyramidtut\tutorial> %VENV%\Scripts\python setup.py test -q The expected result ends something like: -- cgit v1.2.3 From 404b28ba2efb02d93777a3e01fd602c96af8c077 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 6 Sep 2013 00:02:46 -0500 Subject: update the code in the wiki and wiki2 tutorials to use pyramid_chameleon --- docs/tutorials/wiki2/tests.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 33b5d35c1..9aca0c5b7 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -54,8 +54,8 @@ Change the ``requires`` list in ``setup.py`` to include ``WebTest``. .. literalinclude:: src/tests/setup.py :linenos: :language: python - :lines: 11-21 - :emphasize-lines: 10 + :lines: 11-22 + :emphasize-lines: 11 After we've added a dependency on WebTest in ``setup.py``, we need to rerun ``setup.py develop`` to get WebTest installed into our virtualenv. Assuming -- cgit v1.2.3 From 8d88c0ffa7b8e08215c7a06e130c84b2963f3279 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 25 May 2015 02:48:32 -0700 Subject: update templates, line numbers, file references --- docs/tutorials/wiki2/tests.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 9aca0c5b7..c171a0e6e 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -6,8 +6,6 @@ We will now add tests for the models and the views and a few functional tests in the ``tests.py``. Tests ensure that an application works, and that it continues to work after changes are made in the future. - - Testing the Models ================== @@ -37,7 +35,7 @@ can, and so on. Viewing the results of all our edits to ``tests.py`` ==================================================== -Once we're done with the ``tests.py`` module, it will look a lot like: +Open the ``tutorial/tests.py`` module, and edit it as follows: .. literalinclude:: src/tests/tutorial/tests.py :linenos: -- cgit v1.2.3 From ca6ec2fb9f52e0bac9eed622da1cea50b5a45339 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 25 May 2015 11:20:51 -0700 Subject: grammar --- docs/tutorials/wiki2/tests.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index c171a0e6e..e96fb0bae 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -3,8 +3,8 @@ Adding Tests ============ We will now add tests for the models and the views and a few functional -tests in the ``tests.py``. Tests ensure that an application works, and -that it continues to work after changes are made in the future. +tests in ``tests.py``. Tests ensure that an application works, and +that it continues to work when changes are made in the future. Testing the Models ================== @@ -17,12 +17,11 @@ Testing the Views ================= We'll modify our ``tests.py`` file, adding tests for each view -function we added above. As a result, we'll *delete* the +function we added previously. As a result, we'll *delete* the ``ViewTests`` class that the ``alchemy`` scaffold provided, and add four other test classes: ``ViewWikiTests``, ``ViewPageTests``, ``AddPageTests``, and ``EditPageTests``. These test the -``view_wiki``, ``view_page``, ``add_page``, and ``edit_page`` views -respectively. +``view_wiki``, ``view_page``, ``add_page``, and ``edit_page`` views. Functional tests ================ @@ -35,7 +34,8 @@ can, and so on. Viewing the results of all our edits to ``tests.py`` ==================================================== -Open the ``tutorial/tests.py`` module, and edit it as follows: +Open the ``tutorial/tests.py`` module, and edit it such that it appears as +follows: .. literalinclude:: src/tests/tutorial/tests.py :linenos: -- cgit v1.2.3 From 6901d74698da7b8457f92f0771fe03015acb9261 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Wed, 27 May 2015 03:38:39 -0700 Subject: - clean up and make consistent across wiki tutorials - update templates and static assets for new design --- docs/tutorials/wiki2/tests.rst | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index e96fb0bae..9db95334a 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -2,26 +2,25 @@ Adding Tests ============ -We will now add tests for the models and the views and a few functional -tests in ``tests.py``. Tests ensure that an application works, and -that it continues to work when changes are made in the future. +We will now add tests for the models and the views and a few functional tests +in ``tests.py``. Tests ensure that an application works, and that it +continues to work when changes are made in the future. -Testing the Models -================== +Test the models +=============== -To test the model class ``Page`` we'll add a new ``PageModelTests`` -class to our ``tests.py`` file that was generated as part of the -``alchemy`` scaffold. +To test the model class ``Page`` we'll add a new ``PageModelTests`` class to +our ``tests.py`` file that was generated as part of the ``alchemy`` scaffold. -Testing the Views -================= +Test the views +============== -We'll modify our ``tests.py`` file, adding tests for each view -function we added previously. As a result, we'll *delete* the -``ViewTests`` class that the ``alchemy`` scaffold provided, and add -four other test classes: ``ViewWikiTests``, ``ViewPageTests``, -``AddPageTests``, and ``EditPageTests``. These test the -``view_wiki``, ``view_page``, ``add_page``, and ``edit_page`` views. +We'll modify our ``tests.py`` file, adding tests for each view function we +added previously. As a result, we'll *delete* the ``ViewTests`` class that +the ``alchemy`` scaffold provided, and add four other test classes: +``ViewWikiTests``, ``ViewPageTests``, ``AddPageTests``, and ``EditPageTests``. +These test the ``view_wiki``, ``view_page``, ``add_page``, and ``edit_page`` +views. Functional tests ================ @@ -31,8 +30,8 @@ tested in the unit tests, like logging in, logging out, checking that the ``viewer`` user cannot add or edit pages, but the ``editor`` user can, and so on. -Viewing the results of all our edits to ``tests.py`` -==================================================== +View the results of all our edits to ``tests.py`` +================================================= Open the ``tutorial/tests.py`` module, and edit it such that it appears as follows: @@ -41,7 +40,7 @@ follows: :linenos: :language: python -Running the Tests +Running the tests ================= We can run these tests by using ``setup.py test`` in the same way we did in @@ -55,7 +54,7 @@ Change the ``requires`` list in ``setup.py`` to include ``WebTest``. :lines: 11-22 :emphasize-lines: 11 -After we've added a dependency on WebTest in ``setup.py``, we need to rerun +After we've added a dependency on WebTest in ``setup.py``, we need to run ``setup.py develop`` to get WebTest installed into our virtualenv. Assuming our shell's current working directory is the "tutorial" distribution directory: @@ -87,7 +86,7 @@ On Windows: c:\pyramidtut\tutorial> %VENV%\Scripts\python setup.py test -q -The expected result ends something like: +The expected result should look like the following: .. code-block:: text -- cgit v1.2.3 From fe4465b91296ca7d41c4f7c8006cbd8d50851a09 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Fri, 20 Nov 2015 17:48:38 -0800 Subject: wiki2/tests - commit progress --- docs/tutorials/wiki2/tests.rst | 77 +++++++++++++++++++++++++++++------------- 1 file changed, 53 insertions(+), 24 deletions(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 9db95334a..64025421f 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -2,25 +2,38 @@ Adding Tests ============ -We will now add tests for the models and the views and a few functional tests -in ``tests.py``. Tests ensure that an application works, and that it -continues to work when changes are made in the future. +We will now add tests for the models and views as well as a few functional +tests in a new ``tests`` subpackage. Tests ensure that an application works, +and that it continues to work when changes are made in the future. + +The file ``tests.py`` was generated as part of the ``alchemy`` scaffold, but it +is a common practice to put tests into a ``tests`` subpackage, especially as +projects grow in size and complexity. Each module in the test subpackage +should contain tests for its corresponding module in our application. Each +corresponding pair of modules should have the same names, except the test +module should have the prefix "test_". + +We will move parts of ``tests.py`` into appropriate new files in the ``tests`` +subpackage, and add several new tests. + Test the models =============== -To test the model class ``Page`` we'll add a new ``PageModelTests`` class to -our ``tests.py`` file that was generated as part of the ``alchemy`` scaffold. +To test the model class ``Page``, we'll add a new ``PageModelTests`` class to +a new file ``tests/test_models.py`` + Test the views ============== -We'll modify our ``tests.py`` file, adding tests for each view function we -added previously. As a result, we'll *delete* the ``ViewTests`` class that -the ``alchemy`` scaffold provided, and add four other test classes: -``ViewWikiTests``, ``ViewPageTests``, ``AddPageTests``, and ``EditPageTests``. -These test the ``view_wiki``, ``view_page``, ``add_page``, and ``edit_page`` -views. +We'll create a new ``tests/test_views.py`` file, adding tests for each view +function we previously added to our application. As a result, we'll *delete* +the ``ViewTests`` class that the ``alchemy`` scaffold provided, and add four +other test classes: ``ViewWikiTests``, ``ViewPageTests``, ``AddPageTests``, and +``EditPageTests``. These test the ``view_wiki``, ``view_page``, ``add_page``, +and ``edit_page`` views. + Functional tests ================ @@ -30,23 +43,41 @@ tested in the unit tests, like logging in, logging out, checking that the ``viewer`` user cannot add or edit pages, but the ``editor`` user can, and so on. -View the results of all our edits to ``tests.py`` -================================================= -Open the ``tutorial/tests.py`` module, and edit it such that it appears as +View the results of all our edits to ``tests`` subpackage +========================================================= + +Open ``tutorial/tests/test_models.py``, and edit it such that it appears as follows: -.. literalinclude:: src/tests/tutorial/tests.py +.. literalinclude:: src/tests/tutorial/tests/test_models.py :linenos: :language: python +Open ``tutorial/tests/test_views.py``, and edit it such that it appears as +follows: + +.. literalinclude:: src/tests/tutorial/tests/test_views.py + :linenos: + :language: python + +Open ``tutorial/tests/test_.py``, and edit it such that it appears as +follows: + +.. literalinclude:: src/tests/tutorial/tests/test_.py + :linenos: + :language: python + + Running the tests ================= We can run these tests by using ``setup.py test`` in the same way we did in -:ref:`running_tests`. However, first we must edit our ``setup.py`` to -include a dependency on WebTest, which we've used in our ``tests.py``. -Change the ``requires`` list in ``setup.py`` to include ``WebTest``. +:ref:`running_tests`. However, first we must edit our ``setup.py`` to include +a dependency on `WebTest +`_, which we've used +in our ``tests.py``. Change the ``requires`` list in ``setup.py`` to include +``WebTest``. .. literalinclude:: src/tests/setup.py :linenos: @@ -56,12 +87,11 @@ Change the ``requires`` list in ``setup.py`` to include ``WebTest``. After we've added a dependency on WebTest in ``setup.py``, we need to run ``setup.py develop`` to get WebTest installed into our virtualenv. Assuming -our shell's current working directory is the "tutorial" distribution -directory: +our shell's current working directory is the "tutorial" distribution directory: On UNIX: -.. code-block:: text +.. code-block:: bash $ $VENV/bin/python setup.py develop @@ -71,12 +101,11 @@ On Windows: c:\pyramidtut\tutorial> %VENV%\Scripts\python setup.py develop -Once that command has completed successfully, we can run the tests -themselves: +Once that command has completed successfully, we can run the tests themselves: On UNIX: -.. code-block:: text +.. code-block:: bash $ $VENV/bin/python setup.py test -q -- cgit v1.2.3 From f10fb24a3663cb070b28b8020fde957d16563400 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Wed, 2 Dec 2015 04:18:10 -0800 Subject: - rewrite wiki2/tests.rst (removed an obsolete reference to testing models, per 2885a7b96545c037109d7999319f74869a640050) - add wiki2/src/tests/ files. special thanks to @ppaez --- docs/tutorials/wiki2/tests.rst | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 64025421f..fe3fdaf2c 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -11,17 +11,12 @@ is a common practice to put tests into a ``tests`` subpackage, especially as projects grow in size and complexity. Each module in the test subpackage should contain tests for its corresponding module in our application. Each corresponding pair of modules should have the same names, except the test -module should have the prefix "test_". +module should have the prefix ``test_``. We will move parts of ``tests.py`` into appropriate new files in the ``tests`` subpackage, and add several new tests. - -Test the models -=============== - -To test the model class ``Page``, we'll add a new ``PageModelTests`` class to -a new file ``tests/test_models.py`` +Start by creating a new directory and a new empty file ``tests/__init__.py``. Test the views @@ -47,13 +42,6 @@ can, and so on. View the results of all our edits to ``tests`` subpackage ========================================================= -Open ``tutorial/tests/test_models.py``, and edit it such that it appears as -follows: - -.. literalinclude:: src/tests/tutorial/tests/test_models.py - :linenos: - :language: python - Open ``tutorial/tests/test_views.py``, and edit it such that it appears as follows: @@ -61,10 +49,10 @@ follows: :linenos: :language: python -Open ``tutorial/tests/test_.py``, and edit it such that it appears as +Open ``tutorial/tests/test_functional.py``, and edit it such that it appears as follows: -.. literalinclude:: src/tests/tutorial/tests/test_.py +.. literalinclude:: src/tests/tutorial/tests/test_functional.py :linenos: :language: python @@ -119,8 +107,10 @@ The expected result should look like the following: .. code-block:: text - ...................... + .................... ---------------------------------------------------------------------- - Ran 21 tests in 2.700s + Ran 20 tests in 0.524s OK + + Process finished with exit code 0 -- cgit v1.2.3 From 1c108019dae884e810d6436e10f8648c77bdd181 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 8 Feb 2016 00:43:47 -0600 Subject: [wip] update tests in wiki2 tutorial --- docs/tutorials/wiki2/tests.rst | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index fe3fdaf2c..a99cd68cc 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -18,6 +18,14 @@ subpackage, and add several new tests. Start by creating a new directory and a new empty file ``tests/__init__.py``. +.. warning:: + + It is very important when refactoring a Python module into a package to + be sure to delete the cache files (``.pyc`` files or ``__pycache__`` + folders) sitting around! Python will prioritize the cache files before + traversing into folders and so it will use the old code and you will wonder + why none of your changes are working! + Test the views ============== -- cgit v1.2.3 From 66fabb4ac707b5b4289db0094756f1a1af7269cc Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 18 Feb 2016 02:32:08 -0600 Subject: update tests chapter --- docs/tutorials/wiki2/tests.rst | 43 +++++++++++++----------------------------- 1 file changed, 13 insertions(+), 30 deletions(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index a99cd68cc..667550467 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -43,7 +43,7 @@ Functional tests We'll test the whole application, covering security aspects that are not tested in the unit tests, like logging in, logging out, checking that -the ``viewer`` user cannot add or edit pages, but the ``editor`` user +the ``basic`` user cannot edit pages it didn't create, but the ``editor`` user can, and so on. @@ -65,39 +65,20 @@ follows: :language: python -Running the tests -================= - -We can run these tests by using ``setup.py test`` in the same way we did in -:ref:`running_tests`. However, first we must edit our ``setup.py`` to include -a dependency on `WebTest -`_, which we've used -in our ``tests.py``. Change the ``requires`` list in ``setup.py`` to include -``WebTest``. - -.. literalinclude:: src/tests/setup.py - :linenos: - :language: python - :lines: 11-22 - :emphasize-lines: 11 +.. note:: -After we've added a dependency on WebTest in ``setup.py``, we need to run -``setup.py develop`` to get WebTest installed into our virtualenv. Assuming -our shell's current working directory is the "tutorial" distribution directory: + We're utilizing the excellent WebTest_ package to do functional testing + of the application. This is defined in the ``tests_require`` section of + our ``setup.py``. Any other dependencies needed only for testing purposes + can be added there and will be installed automatically when running + ``setup.py test``. -On UNIX: - -.. code-block:: bash - $ $VENV/bin/python setup.py develop - -On Windows: - -.. code-block:: text - - c:\pyramidtut\tutorial> %VENV%\Scripts\python setup.py develop +Running the tests +================= -Once that command has completed successfully, we can run the tests themselves: +We can run these tests by using ``setup.py test`` in the same way we did in +:ref:`running_tests`: On UNIX: @@ -122,3 +103,5 @@ The expected result should look like the following: OK Process finished with exit code 0 + +.. _webtest: http://docs.pylonsproject.org/projects/webtest/en/latest/ -- cgit v1.2.3 From 606f753fc2ca310debc501874db16b60180773d2 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 28 Feb 2016 02:34:24 -0800 Subject: update tests.rst (done) - minor grammar - mention BaseTest class - clean up test output --- docs/tutorials/wiki2/tests.rst | 52 +++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 28 deletions(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 667550467..fa9cbe2fc 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -13,38 +13,36 @@ should contain tests for its corresponding module in our application. Each corresponding pair of modules should have the same names, except the test module should have the prefix ``test_``. -We will move parts of ``tests.py`` into appropriate new files in the ``tests`` -subpackage, and add several new tests. - -Start by creating a new directory and a new empty file ``tests/__init__.py``. +Start by deleting ``tests.py``, then create a new directory to contain our new +tests as well as a new empty file ``tests/__init__.py``. .. warning:: - It is very important when refactoring a Python module into a package to - be sure to delete the cache files (``.pyc`` files or ``__pycache__`` - folders) sitting around! Python will prioritize the cache files before - traversing into folders and so it will use the old code and you will wonder - why none of your changes are working! + It is very important when refactoring a Python module into a package to be + sure to delete the cache files (``.pyc`` files or ``__pycache__`` folders) + sitting around! Python will prioritize the cache files before traversing + into folders, using the old code, and you will wonder why none of your + changes are working! Test the views ============== -We'll create a new ``tests/test_views.py`` file, adding tests for each view -function we previously added to our application. As a result, we'll *delete* -the ``ViewTests`` class that the ``alchemy`` scaffold provided, and add four -other test classes: ``ViewWikiTests``, ``ViewPageTests``, ``AddPageTests``, and -``EditPageTests``. These test the ``view_wiki``, ``view_page``, ``add_page``, -and ``edit_page`` views. +We'll create a new ``tests/test_views.py`` file, adding a ``BaseTest`` class +used as the base for other test classes. Next we'll add tests for each view +function we previously added to our application. We'll add four test classes: +``ViewWikiTests``, ``ViewPageTests``, ``AddPageTests``, and ``EditPageTests``. +These test the ``view_wiki``, ``view_page``, ``add_page``, and ``edit_page`` +views. Functional tests ================ -We'll test the whole application, covering security aspects that are not -tested in the unit tests, like logging in, logging out, checking that -the ``basic`` user cannot edit pages it didn't create, but the ``editor`` user -can, and so on. +We'll test the whole application, covering security aspects that are not tested +in the unit tests, like logging in, logging out, checking that the ``basic`` +user cannot edit pages that it didn't create but the ``editor`` user can, and +so on. View the results of all our edits to ``tests`` subpackage @@ -67,10 +65,10 @@ follows: .. note:: - We're utilizing the excellent WebTest_ package to do functional testing - of the application. This is defined in the ``tests_require`` section of - our ``setup.py``. Any other dependencies needed only for testing purposes - can be added there and will be installed automatically when running + We're utilizing the excellent WebTest_ package to do functional testing of + the application. This is defined in the ``tests_require`` section of our + ``setup.py``. Any other dependencies needed only for testing purposes can be + added there and will be installed automatically when running ``setup.py test``. @@ -88,7 +86,7 @@ On UNIX: On Windows: -.. code-block:: text +.. code-block:: ps1con c:\pyramidtut\tutorial> %VENV%\Scripts\python setup.py test -q @@ -96,12 +94,10 @@ The expected result should look like the following: .. code-block:: text - .................... + ..................... ---------------------------------------------------------------------- - Ran 20 tests in 0.524s + Ran 21 tests in 5.117s OK - Process finished with exit code 0 - .. _webtest: http://docs.pylonsproject.org/projects/webtest/en/latest/ -- cgit v1.2.3 From de3062576ce5aa8b2e854626a48e3f5c46b29cb7 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 28 Feb 2016 11:57:14 -0800 Subject: add note about deprecation warnings on py3 --- docs/tutorials/wiki2/tests.rst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index fa9cbe2fc..dabb73956 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -100,4 +100,11 @@ The expected result should look like the following: OK +.. note:: If you use Python 3 during this tutorial, you will see deprecation + warnings in the output, which we will choose to ignore. In making this + tutorial run on both Python 2 and 3, the authors prioritized simplicity and + focus for the learner over accommodating warnings. In your own app or as + extra credit, you may choose to either drop Python 2 support or hack your + code to work without warnings on both Python 2 and 3. + .. _webtest: http://docs.pylonsproject.org/projects/webtest/en/latest/ -- cgit v1.2.3 From 3e30040da7c2d5c38b330727b48d9f6b852956d9 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 28 Feb 2016 22:30:22 -0800 Subject: redirect to edit page when user attempts to add page that already exists - update src/*/views/default.py - update src/*/routes.py - write new test - revise docs, double-checking line counts and highlighting --- docs/tutorials/wiki2/tests.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index dabb73956..54aea28c6 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -96,7 +96,7 @@ The expected result should look like the following: ..................... ---------------------------------------------------------------------- - Ran 21 tests in 5.117s + Ran 22 tests in 5.320s OK -- cgit v1.2.3 From 640d7779b69f49ab11d7e276a7548684524bc215 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 9 Apr 2016 13:36:11 -0700 Subject: - add intersphinx targets --- docs/tutorials/wiki2/tests.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 54aea28c6..111da0f7a 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -1,3 +1,5 @@ +.. _wiki2_adding_tests: + ============ Adding Tests ============ -- cgit v1.2.3 From e35dcbcd9388d79f3850e9ff8faf76ba14467a10 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 9 Apr 2016 14:46:41 -0700 Subject: - update wiki2/tests step --- docs/tutorials/wiki2/tests.rst | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 111da0f7a..97508168e 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -77,30 +77,26 @@ follows: Running the tests ================= -We can run these tests by using ``setup.py test`` in the same way we did in -:ref:`running_tests`: +We can run these tests similarly to how we did in :ref:`running_tests`: On UNIX: .. code-block:: bash - $ $VENV/bin/python setup.py test -q + $ $VENV/bin/py.test -q On Windows: .. code-block:: ps1con - c:\pyramidtut\tutorial> %VENV%\Scripts\python setup.py test -q + c:\pyramidtut\tutorial> %VENV%\Scripts\py.test -q The expected result should look like the following: .. code-block:: text - ..................... - ---------------------------------------------------------------------- - Ran 22 tests in 5.320s - - OK + ...................... + 22 passed, 1 pytest-warnings in 5.81 seconds .. note:: If you use Python 3 during this tutorial, you will see deprecation warnings in the output, which we will choose to ignore. In making this -- cgit v1.2.3 From a651b357b17746281b429baf5ad9d93edb333072 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 16 Apr 2016 14:27:59 -0700 Subject: replace ps1con with doscon for lexer --- docs/tutorials/wiki2/tests.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/tutorials/wiki2/tests.rst') diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 97508168e..e923ff9cb 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -87,7 +87,7 @@ On UNIX: On Windows: -.. code-block:: ps1con +.. code-block:: doscon c:\pyramidtut\tutorial> %VENV%\Scripts\py.test -q -- cgit v1.2.3