Skip to content

Commit 2aae3f8

Browse files
authored
Merge pull request #29 from UWPCE-PythonCert/cohensauw-patch-1
Update TestDrivenDevelopment.rst
2 parents 2e13661 + e8e4a69 commit 2aae3f8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

source/modules/TestDrivenDevelopment.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,21 @@ FIXME: change the path from my personal to something generic
77
Test Driven Development
88
#######################
99

10-
"Testing" is any strategy for making sure your code behaves as expected. "Unit Testing" is a particular strategy, that:
10+
"Testing" is any strategy for making sure your code behaves as expected. "Unit testing" is a particular strategy, that:
1111

1212
* is easy to run in an automated fashion.
1313
* utilizes isolated tests for each individual function.
1414

15+
1516
"Test Driven Development" (TDD) is a development strategy that integrates the development of unit tests with the code itself. In particular, you write the tests *before* you write the code, which seems pretty backward, but it has some real strengths.
1617

1718
We'll demonstrate this technique with an example.
1819

19-
The Following is adapted from Mark Pilgrim's excellent "Dive into Python":
20+
The following is adapted from Mark Pilgrim's excellent "Dive into Python":
2021

2122
https://diveintopython3.problemsolving.io/
2223

23-
The primary difference is that this version uses the simpler pytest testing framework, rather than `unittest`, which is discussed in:
24+
The primary difference is that this version uses the simpler pytest testing framework, rather than `unittest`, which is discussed in
2425
:ref:`unit_testing`
2526

2627
Unit Testing
@@ -108,7 +109,7 @@ conversion functions — ``to_roman()``, and later ``from_roman()`` — can
108109
be written and tested as a unit, separate from any larger program that
109110
uses them.
110111
111-
Technically, you can write unit tests with plain Python -- recall the ``assert`` statement that you have already used to write simple tests. But it is very helpful to use a framework to make it easier to write and run your tests. In this program, we use the `pytest` package: it is both very easy to get started with, and provides a lot of powerful features to aide in testing complex systems.
112+
Technically, you can write unit tests with plain Python -- recall the ``assert`` statement that you have already used to write simple tests. But it is very helpful to use a framework to make it easier to write and run your tests. In this program, we use the `pytest` package: it is both very easy to get started with, and provides a lot of powerful features to aid in testing complex systems.
112113

113114
.. note:: ``pytest`` does not come with Python out of the box. But it is easily installable via `pip` (or conda, if you are using conda)::
114115

0 commit comments

Comments
 (0)