Skip to content

Commit 9f1ad9c

Browse files
authored
Merge pull request realpython#718 from kikisdeliveryservice/master
Clean up of tests.rst
2 parents 1878711 + 122f67b commit 9f1ad9c

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

docs/writing/tests.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ Testing Your Code
33

44
Testing your code is very important.
55

6-
Getting used to writing the testing code and the running code in parallel is
7-
now considered a good habit. Used wisely, this method helps you define more
6+
Getting used to writing testing code and running this code in parallel is now
7+
considered a good habit. Used wisely, this method helps you define more
88
precisely your code's intent and have a more decoupled architecture.
99

1010
Some general rules of testing:
1111

1212
- A testing unit should focus on one tiny bit of functionality and prove it
1313
correct.
1414

15-
- Each test unit must be fully independent. Each of them must be able to run
16-
alone, and also within the test suite, regardless of the order they are
15+
- Each test unit must be fully independent. Each test must be able to run
16+
alone, and also within the test suite, regardless of the order that they are
1717
called. The implication of this rule is that each test must be loaded with
1818
a fresh dataset and may have to do some cleanup afterwards. This is
1919
usually handled by :meth:`setUp()` and :meth:`tearDown()` methods.
@@ -27,8 +27,8 @@ Some general rules of testing:
2727
tests as often as needed.
2828

2929
- Learn your tools and learn how to run a single test or a test case. Then,
30-
when developing a function inside a module, run this function's tests very
31-
often, ideally automatically when you save the code.
30+
when developing a function inside a module, run this function's tests
31+
frequently, ideally automatically when you save the code.
3232

3333
- Always run the full test suite before a coding session, and run it again
3434
after. This will give you more confidence that you did not break anything
@@ -63,11 +63,11 @@ Some general rules of testing:
6363

6464
- Another use of the testing code is as an introduction to new developers. When
6565
someone will have to work on the code base, running and reading the related
66-
testing code is often the best they can do. They will or should discover the
67-
hot spots, where most difficulties arise, and the corner cases. If they have
68-
to add some functionality, the first step should be to add a test and, by this
69-
means, ensure the new functionality is not already a working path that has not
70-
been plugged into the interface.
66+
testing code is often the best thing that they can do to start. They will
67+
or should discover the hot spots, where most difficulties arise, and the
68+
corner cases. If they have to add some functionality, the first step should
69+
be to add a test to ensure that the new functionality is not already a
70+
working path that has not been plugged into the interface.
7171

7272
The Basics
7373
::::::::::

0 commit comments

Comments
 (0)