Skip to content

Commit

Permalink
alphametics: mark computationally intensive test as extra-credit (#1358)
Browse files Browse the repository at this point in the history
* alphametics: mark computationally intensive test as extra-credit

While this test is canonical, it does not technically add additional coverage. This test serves as a test for efficiency (exercism/problem-specifications#1024 (comment)) of a solution, not completeness.

Furthermore, here are the run-times for this exercise from the [latest Travis build]() (at the time of this writing):
| Python Version | Run-time (seconds) |
| --- | --- |
| 2.7 | 3.155 |
| 3.3 | 2.461 |
| 3.4 | 3.567 |
| 3.5 | 7.270 |
| 3.6 | 0.774 |

Notice that the optimized example solution is only "fast" in 3.6.

* alphametics: add to list of exercises allowed to skip tests in CI
  • Loading branch information
cmccandless committed Apr 3, 2018
1 parent 7307507 commit 511ce06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions exercises/alphametics/alphametics_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def test_puzzle_with_ten_letters(self):
"S": 6,
"T": 9})

@unittest.skip("extra-credit")
def test_puzzle_with_ten_letters_and_199_addends(self):
self.assertEqual(
solve(
Expand Down
2 changes: 1 addition & 1 deletion test/check-exercises.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import json

# Allow high-performance tests to be skipped
ALLOW_SKIP = ['largest-series-product']
ALLOW_SKIP = ['alphametics', 'largest-series-product']


def python_executable_name():
Expand Down

0 comments on commit 511ce06

Please sign in to comment.