Browse files

Merge branch 'master' of github.com:Pylons/pylonshq

  • Loading branch information...
2 parents 991fecd + 4dfca0b commit 7834c0456c64d2ae6e1e799a89b18b7fc5e279ad @mcdonc mcdonc committed Nov 21, 2010
Showing with 6 additions and 6 deletions.
  1. +1 −1 community/codestyle.rst
  2. +5 −5 community/testing.rst
View
2 community/codestyle.rst
@@ -86,7 +86,7 @@ the ``nose`` and ``coverage`` packages).
Testing code in a consistent manner can be difficult, to help developers learn
our style ("dogma") of testing we've made available a set of testing notes.
-:ref:`testing_guidelines`_
+:ref:`testing_guidelines`
Coding Style
------------
View
10 community/testing.rst
@@ -155,7 +155,7 @@ prefer::
Guideline: Minimize module-scope dependencies.
----------------------------------------------
-Unit tests need to be runnable even in an enviornment which is missing some
+Unit tests need to be runnable even in an environment which is missing some
required features: in that case, one or more of the testcase methods (TCMs)
will fail. Defer imports of any needed library modules as late as possible.
@@ -324,7 +324,7 @@ Guideline: Use hooks and registries judiciously.
------------------------------------------------
If the application already allows registering plugins or components, take
-advantage of the fact to insert your mock objects. Don't forget to cleanup
+advantage of the fact to insert your mock objects. Don't forget to clean up
after each test!
It may be acceptable to add hook methods to the application, purely to allow
@@ -337,12 +337,12 @@ version after they run).
Guideline: Use mock objects to clarify dependent contracts
----------------------------------------------------------
-Keeping the contracts on which the AUT dependes as simple as possible makes
+Keeping the contracts on which the AUT depends as simple as possible makes
the AUT easier to write, and more resilient to changes. Writing mock objects
which supply only the simplest possible implementation of such contracts keeps
the AUT from acquiring "dependency creep."
-For example, in a relational application, the the SQL queries used by the
+For example, in a relational application, the SQL queries used by the
application can be mocked up as a dummy implementation which takes keyword
parameters and returns lists of dictionaries::
@@ -378,7 +378,7 @@ for easy testing of how it is used by the AUT::
self.failUnless('NAME1' in names)
self.failUnless('NAME2' in names)
- self.assertEqual(query.called_with, {'bar', 'Dog and Whistle'})
+ self.assertEqual(query.called_with, [{'bar': 'Dog and Whistle'}])
Rule: Don't share text fixtures between test modules.
-----------------------------------------------------

0 comments on commit 7834c04

Please sign in to comment.