Skip to content

Commit 49db307

Browse files
committed
updating unit testing page
1 parent e518f3f commit 49db307

File tree

4 files changed

+107
-10
lines changed

4 files changed

+107
-10
lines changed

all.html

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6587,6 +6587,29 @@ <h2>Why is unit testing important?</h2>
65876587
together as a whole the separate parts work as correct as possible. Then
65886588
when issues arise they can often be tracked down as unintended consequences
65896589
of the disparate pieces not fitting together properly.</p>
6590+
<h2>Unit testing tools</h2>
6591+
<p>There are many tools for creating tests in Python. Some of these tools, such
6592+
as pytest, replace the built-in unittest framework. Other tools, such as
6593+
nose, are extensions that ease test case creation.</p>
6594+
<ul>
6595+
<li>
6596+
<p><a href="https://docs.python.org/3/library/unittest.html">unittest</a>
6597+
is the built-in standard library tool for testing Python code.</p>
6598+
</li>
6599+
<li>
6600+
<p><a href="http://pytest.org/latest/">pytest</a></p>
6601+
</li>
6602+
<li>
6603+
<p><a href="https://nose.readthedocs.org/en/latest/">nose</a> is an extension to
6604+
unittest that makes it easier to create and execute test cases.</p>
6605+
</li>
6606+
<li>
6607+
<p><a href="https://github.com/Yelp/Testify/">testify</a> was a testing framework
6608+
meant to replace the common unittest+nose combination. However, the team
6609+
behind testify is transitioning to pytest so it's recommended you do
6610+
not use testify for new projects.</p>
6611+
</li>
6612+
</ul>
65906613
<h3>Unit testing resources</h3>
65916614
<ul>
65926615
<li>
@@ -6597,11 +6620,22 @@ <h3>Unit testing resources</h3>
65976620
<li>
65986621
<p><a href="http://www.diveintopython3.net/unit-testing.html">Dive into Python 3's chapter on unit testing</a>
65996622
has a complete example with code and a detailed explanation for creating
6600-
unit testing with the unittest module.</p>
6623+
unit testing with the
6624+
<a href="https://docs.python.org/3/library/unittest.html">unittest</a> module.</p>
6625+
</li>
6626+
<li>
6627+
<p><a href="https://jeffknupp.com/blog/2013/12/09/improve-your-python-understanding-unit-testing/">Understanding unit testing</a>
6628+
explains why testing is important and shows how to do it effectively in
6629+
your applications.</p>
6630+
</li>
6631+
<li>
6632+
<p><a href="http://www.drdobbs.com/testing/unit-testing-with-python/240165163">Unit testing with Python</a>
6633+
provides a high-level overview of testing and has diagrams to demonstrate
6634+
what's going on in the testing cycle.</p>
66016635
</li>
66026636
<li>
6603-
<p><a href="https://docs.python.org/3/library/unittest.html">unittest</a> is the
6604-
built-in standard library tool for testing Python code.</p>
6637+
<p>The Python wiki has a page with a list of
6638+
<a href="https://wiki.python.org/moin/PythonTestingToolsTaxonomy">Python testing tools and extensions</a>.</p>
66056639
</li>
66066640
</ul>
66076641
<h1>Code Metrics</h1>

feeds/all.atom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<feed xmlns="http://www.w3.org/2005/Atom"><title>Matt Makai</title><link href="http://www.fullstackpython.com/" rel="alternate"></link><link href="http://www.fullstackpython.com/feeds/all.atom.xml" rel="self"></link><id>http://www.fullstackpython.com/</id><updated>2015-08-29T09:33:00Z</updated></feed>
2+
<feed xmlns="http://www.w3.org/2005/Atom"><title>Matt Makai</title><link href="http://www.fullstackpython.com/" rel="alternate"></link><link href="http://www.fullstackpython.com/feeds/all.atom.xml" rel="self"></link><id>http://www.fullstackpython.com/</id><updated>2015-08-29T09:48:14Z</updated></feed>

source/content/pages/08-testing/02-unit-testing.markdown

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,43 @@ when issues arise they can often be tracked down as unintended consequences
2424
of the disparate pieces not fitting together properly.
2525

2626

27+
## Unit testing tools
28+
There are many tools for creating tests in Python. Some of these tools, such
29+
as pytest, replace the built-in unittest framework. Other tools, such as
30+
nose, are extensions that ease test case creation.
31+
32+
* [unittest](https://docs.python.org/3/library/unittest.html)
33+
is the built-in standard library tool for testing Python code.
34+
35+
* [pytest](http://pytest.org/latest/)
36+
37+
* [nose](https://nose.readthedocs.org/en/latest/) is an extension to
38+
unittest that makes it easier to create and execute test cases.
39+
40+
* [testify](https://github.com/Yelp/Testify/) was a testing framework
41+
meant to replace the common unittest+nose combination. However, the team
42+
behind testify is transitioning to pytest so it's recommended you do
43+
not use testify for new projects.
44+
45+
2746
### Unit testing resources
2847
* [The Minimum Viable Test Suite](https://realpython.com/blog/python/the-minimum-viable-test-suite/)
2948
shows how to set unit tests and integration tests for a Flask example
3049
application.
3150

3251
* [Dive into Python 3's chapter on unit testing](http://www.diveintopython3.net/unit-testing.html)
3352
has a complete example with code and a detailed explanation for creating
34-
unit testing with the unittest module.
53+
unit testing with the
54+
[unittest](https://docs.python.org/3/library/unittest.html) module.
55+
56+
* [Understanding unit testing](https://jeffknupp.com/blog/2013/12/09/improve-your-python-understanding-unit-testing/)
57+
explains why testing is important and shows how to do it effectively in
58+
your applications.
59+
60+
* [Unit testing with Python](http://www.drdobbs.com/testing/unit-testing-with-python/240165163)
61+
provides a high-level overview of testing and has diagrams to demonstrate
62+
what's going on in the testing cycle.
63+
64+
* The Python wiki has a page with a list of
65+
[Python testing tools and extensions](https://wiki.python.org/moin/PythonTestingToolsTaxonomy).
3566

36-
* [unittest](https://docs.python.org/3/library/unittest.html) is the
37-
built-in standard library tool for testing Python code.

unit-testing.html

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,29 @@ <h2>Why is unit testing important?</h2>
4949
together as a whole the separate parts work as correct as possible. Then
5050
when issues arise they can often be tracked down as unintended consequences
5151
of the disparate pieces not fitting together properly.</p>
52+
<h2>Unit testing tools</h2>
53+
<p>There are many tools for creating tests in Python. Some of these tools, such
54+
as pytest, replace the built-in unittest framework. Other tools, such as
55+
nose, are extensions that ease test case creation.</p>
56+
<ul>
57+
<li>
58+
<p><a href="https://docs.python.org/3/library/unittest.html">unittest</a>
59+
is the built-in standard library tool for testing Python code.</p>
60+
</li>
61+
<li>
62+
<p><a href="http://pytest.org/latest/">pytest</a></p>
63+
</li>
64+
<li>
65+
<p><a href="https://nose.readthedocs.org/en/latest/">nose</a> is an extension to
66+
unittest that makes it easier to create and execute test cases.</p>
67+
</li>
68+
<li>
69+
<p><a href="https://github.com/Yelp/Testify/">testify</a> was a testing framework
70+
meant to replace the common unittest+nose combination. However, the team
71+
behind testify is transitioning to pytest so it's recommended you do
72+
not use testify for new projects.</p>
73+
</li>
74+
</ul>
5275
<h3>Unit testing resources</h3>
5376
<ul>
5477
<li>
@@ -59,11 +82,22 @@ <h3>Unit testing resources</h3>
5982
<li>
6083
<p><a href="http://www.diveintopython3.net/unit-testing.html">Dive into Python 3's chapter on unit testing</a>
6184
has a complete example with code and a detailed explanation for creating
62-
unit testing with the unittest module.</p>
85+
unit testing with the
86+
<a href="https://docs.python.org/3/library/unittest.html">unittest</a> module.</p>
87+
</li>
88+
<li>
89+
<p><a href="https://jeffknupp.com/blog/2013/12/09/improve-your-python-understanding-unit-testing/">Understanding unit testing</a>
90+
explains why testing is important and shows how to do it effectively in
91+
your applications.</p>
92+
</li>
93+
<li>
94+
<p><a href="http://www.drdobbs.com/testing/unit-testing-with-python/240165163">Unit testing with Python</a>
95+
provides a high-level overview of testing and has diagrams to demonstrate
96+
what's going on in the testing cycle.</p>
6397
</li>
6498
<li>
65-
<p><a href="https://docs.python.org/3/library/unittest.html">unittest</a> is the
66-
built-in standard library tool for testing Python code.</p>
99+
<p>The Python wiki has a page with a list of
100+
<a href="https://wiki.python.org/moin/PythonTestingToolsTaxonomy">Python testing tools and extensions</a>.</p>
67101
</li>
68102
</ul>
69103
<h3>What else do you want to learn about testing?</h3>

0 commit comments

Comments
 (0)