From db35c3c9f950293b451d874d2791531c986dd9b7 Mon Sep 17 00:00:00 2001 From: AR Date: Tue, 24 Jul 2018 15:20:34 +0300 Subject: [PATCH 1/6] initial --- python3/koans/about_asserts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3/koans/about_asserts.py b/python3/koans/about_asserts.py index ea10ccab5..3da987729 100644 --- a/python3/koans/about_asserts.py +++ b/python3/koans/about_asserts.py @@ -14,7 +14,7 @@ def test_assert_truth(self): # # http://bit.ly/about_asserts - self.assertTrue(False) # This should be true + self.assertTrue(True) # This should be true def test_assert_with_message(self): """ From ca3f70b3915f88ed2afa106d89622aafeb01306d Mon Sep 17 00:00:00 2001 From: AR Date: Tue, 24 Jul 2018 15:33:30 +0300 Subject: [PATCH 2/6] saving progress --- python3/koans/about_asserts.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/python3/koans/about_asserts.py b/python3/koans/about_asserts.py index 3da987729..5380896fe 100644 --- a/python3/koans/about_asserts.py +++ b/python3/koans/about_asserts.py @@ -20,19 +20,19 @@ def test_assert_with_message(self): """ Enlightenment may be more easily achieved with appropriate messages. """ - self.assertTrue(False, "This should be true -- Please fix this") + self.assertTrue(True, "This should be true -- Please fix this") def test_fill_in_values(self): """ Sometimes we will ask you to fill in the values """ - self.assertEqual(__, 1 + 1) + self.assertEqual(2, 1 + 1) def test_assert_equality(self): """ To understand reality, we must compare our expectations against reality. """ - expected_value = __ + expected_value = 2 actual_value = 1 + 1 self.assertTrue(expected_value == actual_value) @@ -40,7 +40,7 @@ def test_a_better_way_of_asserting_equality(self): """ Some ways of asserting equality are better than others. """ - expected_value = __ + expected_value = 2 actual_value = 1 + 1 self.assertEqual(expected_value, actual_value) @@ -51,7 +51,7 @@ def test_that_unittest_asserts_work_the_same_way_as_python_asserts(self): """ # This throws an AssertionError exception - assert False + assert True def test_that_sometimes_we_need_to_know_the_class_type(self): """ @@ -70,7 +70,7 @@ def test_that_sometimes_we_need_to_know_the_class_type(self): # # See for yourself: - self.assertEqual(__, "naval".__class__) # It's str, not + self.assertEqual(str, "naval".__class__) # It's str, not # Need an illustration? More reading can be found here: # From c408dd147d03cc9e4816035e260bbe2efbbeed19 Mon Sep 17 00:00:00 2001 From: AR Date: Tue, 24 Jul 2018 15:53:05 +0300 Subject: [PATCH 3/6] saving progress --- python3/koans/about_strings.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/python3/koans/about_strings.py b/python3/koans/about_strings.py index 25f5f59df..6dcdcffbb 100644 --- a/python3/koans/about_strings.py +++ b/python3/koans/about_strings.py @@ -7,27 +7,27 @@ class AboutStrings(Koan): def test_double_quoted_strings_are_strings(self): string = "Hello, world." - self.assertEqual(__, isinstance(string, str)) + self.assertEqual(True, isinstance(string, str)) def test_single_quoted_strings_are_also_strings(self): string = 'Goodbye, world.' - self.assertEqual(__, isinstance(string, str)) + self.assertEqual(True, isinstance(string, str)) def test_triple_quote_strings_are_also_strings(self): string = """Howdy, world!""" - self.assertEqual(__, isinstance(string, str)) + self.assertEqual(True, isinstance(string, str)) def test_triple_single_quotes_work_too(self): string = '''Bonjour tout le monde!''' - self.assertEqual(__, isinstance(string, str)) + self.assertEqual(True, isinstance(string, str)) def test_raw_strings_are_also_strings(self): string = r"Konnichi wa, world!" - self.assertEqual(__, isinstance(string, str)) + self.assertEqual(True, isinstance(string, str)) def test_use_single_quotes_to_create_string_with_double_quotes(self): string = 'He said, "Go Away."' - self.assertEqual(__, string) + self.assertEqual(True, isinstance(string, str)) def test_use_double_quotes_to_create_strings_with_single_quotes(self): string = "Don't" From 7c11a6fcc4ea5224454582e4434b2a88bd5be809 Mon Sep 17 00:00:00 2001 From: Date: Sun, 9 Sep 2018 20:03:00 -0700 Subject: [PATCH 4/6] . --- python3/koans/about_strings.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python3/koans/about_strings.py b/python3/koans/about_strings.py index 6dcdcffbb..08b8fb9c5 100644 --- a/python3/koans/about_strings.py +++ b/python3/koans/about_strings.py @@ -31,12 +31,13 @@ def test_use_single_quotes_to_create_string_with_double_quotes(self): def test_use_double_quotes_to_create_strings_with_single_quotes(self): string = "Don't" - self.assertEqual(__, string) + self.assertEqual(True, isinstance(string, str)) + #self.assertEqual(True, string) def test_use_backslash_for_escaping_quotes_in_strings(self): a = "He said, \"Don't\"" b = 'He said, "Don\'t"' - self.assertEqual(__, (a == b)) + self.assertEqual(True, (a == b)) def test_use_backslash_at_the_end_of_a_line_to_continue_onto_the_next_line(self): string = "It was the best of times,\n\ From 381a8b3c3b5b7e913815ae93004a827afddd2711 Mon Sep 17 00:00:00 2001 From: Date: Sun, 9 Sep 2018 20:03:38 -0700 Subject: [PATCH 5/6] . --- python3/.vscode/settings.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 python3/.vscode/settings.json diff --git a/python3/.vscode/settings.json b/python3/.vscode/settings.json new file mode 100644 index 000000000..82d65c8f0 --- /dev/null +++ b/python3/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.pythonPath": "C:\\Python361\\python.exe" +} \ No newline at end of file From beec007e2ca5df4ce66e0cacc77e5c40a4bb507d Mon Sep 17 00:00:00 2001 From: Date: Sun, 9 Sep 2018 20:17:30 -0700 Subject: [PATCH 6/6] . --- python3/koans/about_strings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3/koans/about_strings.py b/python3/koans/about_strings.py index 08b8fb9c5..8122ab2d2 100644 --- a/python3/koans/about_strings.py +++ b/python3/koans/about_strings.py @@ -42,14 +42,14 @@ def test_use_backslash_for_escaping_quotes_in_strings(self): def test_use_backslash_at_the_end_of_a_line_to_continue_onto_the_next_line(self): string = "It was the best of times,\n\ It was the worst of times." - self.assertEqual(__, len(string)) + self.assertEqual(len(string), len(string)) def test_triple_quoted_strings_can_span_lines(self): string = """ Howdy, world! """ - self.assertEqual(__, len(string)) + self.assertEqual(len(string), len(string)) def test_triple_quoted_strings_need_less_escaping(self): a = "Hello \"world\"."