diff --git a/exercises/alphametics/.meta/template.j2 b/exercises/alphametics/.meta/template.j2 index 1f008566d5a..f73edb126cd 100644 --- a/exercises/alphametics/.meta/template.j2 +++ b/exercises/alphametics/.meta/template.j2 @@ -4,14 +4,19 @@ class {{ exercise | camel_case }}Test(unittest.TestCase): {% for case in cases[0]["cases"] -%} {% set description = case["description"] | to_snake -%} + {% set testdef = "def test_" ~ description ~ "(self):" -%} {% set value = case["input"]["puzzle"] -%} - {% if value|length > 100 -%} - # Reason to skip this test at https://github.com/exercism/python/pull/1358 + {% set long_test = value|length > 100 -%} + {% if long_test -%} + # See https://github.com/exercism/python/pull/1358 @unittest.skip("extra-credit") - {% endif %} - def test_{{ description }}(self): + {{ testdef }} + """This test may take a long time to run. Please be patient when running it.""" + {%- else %} + {{ testdef }} + {%- endif %} {% set expected = case["expected"] -%} - {% if value|length > 100 -%} + {% if long_test -%} {% for line in value | wrap_overlong(width=62) -%} {% if loop.index == 1 -%} puzzle = {{ line }} diff --git a/exercises/alphametics/alphametics_test.py b/exercises/alphametics/alphametics_test.py index 3bcec12a837..9b1003efb91 100644 --- a/exercises/alphametics/alphametics_test.py +++ b/exercises/alphametics/alphametics_test.py @@ -59,9 +59,10 @@ def test_puzzle_with_ten_letters(self): }, ) - # Reason to skip this test at https://github.com/exercism/python/pull/1358 + # See https://github.com/exercism/python/pull/1358 @unittest.skip("extra-credit") def test_puzzle_with_ten_letters_and_199_addends(self): + """This test may take a long time to run. Please be patient when running it.""" puzzle = ( "THIS + A + FIRE + THEREFORE + FOR + ALL + HISTORIES + I + TELL" "+ A + TALE + THAT + FALSIFIES + ITS + TITLE + TIS + A + LIE +"