Minor Fix output format for adaptive courses check from samples
authorValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Thu, 9 Jun 2016 12:35:03 +0000 (15:35 +0300)
committerValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Thu, 9 Jun 2016 18:17:19 +0000 (21:17 +0300)
python/educational-python/resources/fileTemplates/internal/test_helper.py.ft

index 250f253d8decbd6f57be9180d7a296b08df184f5..c858ac375be06c15c946406d291fdc5e418d3667 100644 (file)
@@ -205,13 +205,11 @@ def check_samples(samples=()):
             if "\n".join(output) != sample[1]:
                 failed(
                     "Test from samples failed: \n \n"
-                    "Input:\n {}"
+                    "Input:\n{}"
                     "\n \n"
-                    "Expected:\n {}"
+                    "Expected:\n{}"
                     "\n \n"
-                    "Your result:\n {}".format(sample[0], 
-                                                        sample[1], 
-                                                        "\n".join(output)))
+                    "Your result:\n{}".format(str.strip(sample[0]), str.strip(sample[1]), "\n".join(output)))
                 return
         set_congratulation_message("All test from samples passed. Now we are checking your solution on Stepic server.")