diff options
| author | Tyler Wardhaugh <tyler.wardhaugh@gmail.com> | 2021-02-25 10:47:22 -0800 |
|---|---|---|
| committer | Tyler Wardhaugh <tyler.wardhaugh@gmail.com> | 2021-02-25 14:11:04 -0800 |
| commit | 7ee7cb632f67d902f69df08aa3df56224a68dacd (patch) | |
| tree | ee0f93e57adf66b063c385e115c6f897a27364ff /challenge-101/tyler-wardhaugh/python/test_ch1.py | |
| parent | 1b4ace0cc2d0c7dce94718b0e61a30bddd575867 (diff) | |
| download | perlweeklychallenge-club-7ee7cb632f67d902f69df08aa3df56224a68dacd.tar.gz perlweeklychallenge-club-7ee7cb632f67d902f69df08aa3df56224a68dacd.tar.bz2 perlweeklychallenge-club-7ee7cb632f67d902f69df08aa3df56224a68dacd.zip | |
Ch101 (Python): Tasks 1 & 2
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() |
