Commits

Greg Malcolm committed ce0e493

Testing rst related changes

Comments (0)

Files changed (1)

 Downloading Python Koans
 ------------------------
 
-Python Koans is available through Mercurial on bitbucket:
+Python Koans is available through git on Github:
+
+    http://wiki.github.com/gregmalcolm/python_koans
+
+It is also mirrored on bitbucet for Mercurial users :
 
     http://bitbucket.org/gregmalcolm/python_koans
 
-It is also mirrored on github for Git users :
-
-    http://wiki.github.com/gregmalcolm/python_koans
-
 Either site will allow you to download the source as a zip/gz/bz2.
 
 
 
 From a *nix terminal or windows command prompt go to the python koans\python_<b>VERSION</b> folder and run: 
 
+::
     python contemplate_koans.py
 
 or
 
+::
     python3 contemplate_koans.py
 
 In my case I'm using Python 3 with windows, so I fire up my command shell (cmd.exe) and run this:
 
+::
     C:\>cd "c:\hg\python_koans\python3"
     C:\hg\python_koans\python3>python contemplate_koans.py
   
     assert_truth
         self.assertTrue(False) # This should be true
 
-
     Beautiful is better than ugly.
     C:\hg\python_koans\python3>
 
 Apparently a test failed:
 
+::
     AssertionError: False is not True
 
 It also tells me exactly where the problem in, its an assert on line 12 of .\koans\about_asserts.py. This one is easy, just change False to True to make the test pass.
 
 Sooner or later you will likely encounter tests where you are not sure what the expected value should be. For example:
 
+::
     class Dog:
         pass
 
 
 This is where the Python Command Line can come in handy. in this case I can fire up the command line, recreate the scenario and run queries:
 
+::
     C:\hg\python_koans\python3>python
     Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on
     win32
 
 Quoting the Ruby Koans instructions:
 
-    "In test-driven development the mantra has always been, red, green, refactor. Write a failing test and run it (red), make the test pass (green), then refactor it (that is look at the code and see if you can make it any better. In this case you will need to run the koan and see it fail (red), make the test pass (green), then take a moment and reflect upon the test to see what it is teaching you and improve the code to better communicate its intent (refactor)."
-
+  "In test-driven development the mantra has always been, red, green, refactor. Write a failing test and run it (red), make the test pass (green), then refactor it (that is look at the code and see if you can make it any better. In this case you will need to run the koan and see it fail (red), make the test pass (green), then take a moment and reflect upon the test to see what it is teaching you and improve the code to better communicate its intent (refactor)."
 
 Content
 -------
 
 Content for Python 3 is a little different to the Python 2 flavor due to big changes between the 2 different languages. For example in the Python 2 variant the differences between old and new style classes are covered. This loses relevance in in the Python 3 version, but there are some extra tests covering new functionality.
 
-
 Finding More Koan Projects
 --------------------------
 
 
 A couple of promising projects include DotNetKoans and TestMongoKoans.
 
-
 Acknowledgments
 ---------------
 
 Thanks go to Jim Weirich and Joe O'Brien for the original Ruby Koans that Python Koans is based on! Also the Ruby Koans in turn borrows from Metakoans so thanks also go to Ara Howard for that!
 
-
 Also thanks to everyone who helped with the Python Koans conversion! In particular I got a great headstart on the project by forking from this Python Koans startup project:
 
     http://bitbucket.org/mcrute/python_koans/