mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 23:00:18 +00:00
Host photos locally
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
Testing Your Code
|
||||
=================
|
||||
|
||||
.. image:: https://farm5.staticflickr.com/4166/34435687940_8f73fc1fa6_k_d.jpg
|
||||
.. image:: /_static/photos/34435687940_8f73fc1fa6_k_d.jpg
|
||||
|
||||
Testing your code is very important.
|
||||
|
||||
Getting used to writing testing code and running this code in parallel is now
|
||||
Getting used to writing testing code and running this code in parallel is now
|
||||
considered a good habit. Used wisely, this method helps you define more
|
||||
precisely your code's intent and have a more decoupled architecture.
|
||||
|
||||
@@ -29,7 +29,7 @@ Some general rules of testing:
|
||||
tests as often as needed.
|
||||
|
||||
- Learn your tools and learn how to run a single test or a test case. Then,
|
||||
when developing a function inside a module, run this function's tests
|
||||
when developing a function inside a module, run this function's tests
|
||||
frequently, ideally automatically when you save the code.
|
||||
|
||||
- Always run the full test suite before a coding session, and run it again
|
||||
@@ -65,10 +65,10 @@ Some general rules of testing:
|
||||
|
||||
- Another use of the testing code is as an introduction to new developers. When
|
||||
someone will have to work on the code base, running and reading the related
|
||||
testing code is often the best thing that they can do to start. They will
|
||||
or should discover the hot spots, where most difficulties arise, and the
|
||||
corner cases. If they have to add some functionality, the first step should
|
||||
be to add a test to ensure that the new functionality is not already a
|
||||
testing code is often the best thing that they can do to start. They will
|
||||
or should discover the hot spots, where most difficulties arise, and the
|
||||
corner cases. If they have to add some functionality, the first step should
|
||||
be to add a test to ensure that the new functionality is not already a
|
||||
working path that has not been plugged into the interface.
|
||||
|
||||
The Basics
|
||||
|
||||
Reference in New Issue
Block a user