diff options
Diffstat (limited to 'challenge-101/tyler-wardhaugh/python/test_ch1.py')
| -rwxr-xr-x | challenge-101/tyler-wardhaugh/python/test_ch1.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/challenge-101/tyler-wardhaugh/python/test_ch1.py b/challenge-101/tyler-wardhaugh/python/test_ch1.py new file mode 100755 index 0000000000..9355f68556 --- /dev/null +++ b/challenge-101/tyler-wardhaugh/python/test_ch1.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 +"""Test Task 1""" + +import unittest +from ch1 import pack_spiral + + +class TestTask1(unittest.TestCase): + """Test Task 1""" + + def test_example_cases(self): + """Test Task 1""" + self.assertEqual([[4, 3], [1, 2]], + pack_spiral(list(range(1, 5)))) + self.assertEqual([[6, 5, 4], [1, 2, 3]], + pack_spiral(list(range(1, 7)))) + self.assertEqual([[9, 8, 7, 6], [10, 11, 12, 5], [1, 2, 3, 4]], + pack_spiral(list(range(1, 13)))) + + +if __name__ == '__main__': + unittest.main() |
