Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 122f67b

Browse filesBrowse files
author
kikisdeliveryservice
committed
Clean up of tests.rst
1 parent 673ed9a commit 122f67b
Copy full SHA for 122f67b

File tree

Expand file treeCollapse file tree

1 file changed

+11
-11
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-11
lines changed

‎docs/writing/tests.rst

Copy file name to clipboardExpand all lines: docs/writing/tests.rst
+11-11Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.