2017-04-03 10:48:11 -03:00
|
|
|
import unittest
|
|
|
|
|
|
2021-01-31 16:49:12 -05:00
|
|
|
from rotational_cipher import (
|
|
|
|
|
rotate,
|
|
|
|
|
)
|
2017-04-03 10:48:11 -03:00
|
|
|
|
2020-10-15 12:46:24 -04:00
|
|
|
# Tests adapted from `problem-specifications//canonical-data.json`
|
2017-04-05 11:36:23 +02:00
|
|
|
|
2019-10-06 07:52:07 +05:30
|
|
|
|
2018-06-13 09:12:09 -04:00
|
|
|
class RotationalCipherTest(unittest.TestCase):
|
2017-10-25 14:36:29 +02:00
|
|
|
|
2021-05-09 02:33:32 -07:00
|
|
|
# Utility functions
|
|
|
|
|
def assertRaisesWithMessage(self, exception):
|
|
|
|
|
return self.assertRaisesRegex(exception, r".+")
|
2017-04-03 10:48:11 -03:00
|
|
|
|
|
|
|
|
|
2019-10-06 07:52:07 +05:30
|
|
|
if __name__ == "__main__":
|
2017-04-03 10:48:11 -03:00
|
|
|
unittest.main()
|