Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,22 @@ In my case I'm using Python 3 with Windows, so I fire up my command
shell (cmd.exe) and run this:

.. image:: https://user-images.githubusercontent.com/2614930/28401747-f723ff00-6cd0-11e7-9b9a-a6993b753cf6.png
Skipping to a Specific Lesson
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you have already completed earlier koans or want to work on a specific
lesson, you can start the koans from that lesson by passing the lesson name as
an argument.

For example::

python contemplate_koans.py about_strings

or:

python3 contemplate_koans.py about_strings

This starts the koans from ``about_strings`` instead of the first lesson.
Apparently a test failed::

AssertionError: False is not True
Expand Down
13 changes: 9 additions & 4 deletions koans/about_strings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-



from runner.koan import *

class AboutStrings(Koan):
Expand All @@ -26,12 +28,15 @@ def test_raw_strings_are_also_strings(self):
self.assertEqual(__, isinstance(string, str))

def test_use_single_quotes_to_create_string_with_double_quotes(self):
string = 'He said, "Go Away."'
self.assertEqual(__, string)
single_quoted = 'He said, "Go Away."'
double_quoted = "He said, \"Go Away.\""
self.assertEqual(__, single_quoted == double_quoted)

def test_use_double_quotes_to_create_strings_with_single_quotes(self):
string = "Don't"
self.assertEqual(__, string)
double_quoted = "Don't"
single_quoted = 'Don\'t'

self.assertEqual(__, single_quoted == double_quoted)

def test_use_backslash_for_escaping_quotes_in_strings(self):
a = "He said, \"Don't\""
Expand Down