2014-04-15 00:09:01 +02:00
|
|
|
import unittest
|
2014-06-11 15:06:22 +02:00
|
|
|
|
2021-01-31 16:49:12 -05:00
|
|
|
from zebra_puzzle import (
|
|
|
|
|
drinks_water,
|
|
|
|
|
owns_zebra,
|
|
|
|
|
)
|
2014-04-15 00:09:01 +02:00
|
|
|
|
2020-10-15 12:46:24 -04:00
|
|
|
# Tests adapted from `problem-specifications//canonical-data.json`
|
2018-02-19 22:59:34 +08:00
|
|
|
|
2019-10-04 11:27:21 -05:00
|
|
|
|
2014-04-15 00:09:01 +02:00
|
|
|
class ZebraPuzzleTest(unittest.TestCase):
|
2018-02-19 22:59:34 +08:00
|
|
|
def test_resident_who_drinks_water(self):
|
|
|
|
|
self.assertEqual(drinks_water(), "Norwegian")
|
|
|
|
|
|
|
|
|
|
def test_resident_who_owns_zebra(self):
|
|
|
|
|
self.assertEqual(owns_zebra(), "Japanese")
|