@@ -3,7 +3,7 @@ Testing Your Code
3
3
4
4
Testing your code is very important.
5
5
6
- Getting used to writting the testing code and the running code in parallel is
6
+ Getting used to writing the testing code and the running code in parallel is
7
7
now considered a good habit. Used wisely, this method helps you define more
8
8
precisely your code's intent and have a more decoupled architecture.
9
9
@@ -39,7 +39,7 @@ Some general rules of testing:
39
39
40
40
- If you are in the middle of a development and have to interrupt your work, it
41
41
is a good idea to write a broken unit test about what you want to develop next.
42
- When comming back to work, you will have a pointer to where you were and get
42
+ When coming back to work, you will have a pointer to where you were and get
43
43
faster on tracks.
44
44
45
45
- The first step when you are debugging your code is to write a new test
@@ -48,7 +48,7 @@ Some general rules of testing:
48
48
49
49
- Use long and descriptive names for testing functions. The style guide here is
50
50
slightly different than that of running code, where short names are often
51
- preferred. The reason is testing functions are never called explicitely .
51
+ preferred. The reason is testing functions are never called explicitly .
52
52
``square() `` or even ``sqr() `` is ok in running code, but in testing code you
53
53
would has names such as ``test_square_of_number_2() ``,
54
54
``test_square_negative_number() ``. These function names are displayed when a
@@ -61,7 +61,7 @@ Some general rules of testing:
61
61
purpose is unclear is not very helpful is this case.
62
62
63
63
- Another use of the testing code is as an introduction to new developers. When
64
- someone will have to work on the code base, runnning and reading the related
64
+ someone will have to work on the code base, running and reading the related
65
65
testing code is often the best they can do. They will or should discover the
66
66
hot spots, where most difficulties arise, and the corner cases. If they have
67
67
to add some functionality, the first step should be to add a test and, by this
@@ -214,15 +214,15 @@ multiple interpreter configurations
214
214
215
215
$ pip install tox
216
216
217
- tox allows you to configure complicatated multi-parameter test matrices via a
217
+ tox allows you to configure complicated multi-parameter test matrices via a
218
218
simple ini-style configuration file.
219
219
220
220
`tox <http://tox.testrun.org/latest/ >`_
221
221
222
222
Unittest2
223
223
---------
224
224
225
- unittest2 is a a backport of Python 2.7's unittest module which has an improved
225
+ unittest2 is a backport of Python 2.7's unittest module which has an improved
226
226
API and better assertions over the one available in previous versions of Python.
227
227
228
228
If you're using Python 2.6 or below, you can install it with pip
0 commit comments