# Path: tests/test_ipuz.py
# class IPUZBaseTestCase(unittest.TestCase):
# 
#     def validate_puzzle(self, json_data, expected_exception, **kwargs):
#         with self.assertRaises(ipuz.IPUZException) as cm:
#             ipuz.read(json.dumps(json_data), **kwargs)
#         self.assertEqual(str(cm.exception), expected_exception)
# 
#     def validate(self, expected_exception):
#         self.validate_puzzle(self.puzzle, expected_exception)


from .test_ipuz import IPUZBaseTestCase

    def test_misses_is_dict_with_non_text_value(self):
        self.puzzle["misses"] = {"A": 3}
        self.validate("Invalid misses value found")

    def test_points_is_text(self):
        self.puzzle["points"] = 3
        self.validate("Invalid points value found")

    def test_time_is_integer(self):
        self.puzzle["time"] = "time"
        self.validate("Invalid time value found")

    def test_time_is_integer_and_not_bool(self):
        self.puzzle["time"] = True
        self.validate("Invalid time value found")

    def test_time_is_non_negative_integer(self):
        self.puzzle["time"] = -1
        self.validate("Invalid time value found")

    def test_showanswers_is_text(self):
        self.puzzle["showanswers"] = 3
        self.validate("Invalid showanswers value found")

    def test_dictionary_is_text_or_false(self):
        self.puzzle["dictionary"] = 3
        self.validate("Invalid dictionary value found")

    def test_dictionary_is_not_true(self):

# Path: tests/test_ipuz.py
# class IPUZBaseTestCase(unittest.TestCase):
# 
#     def validate_puzzle(self, json_data, expected_exception, **kwargs):
#         with self.assertRaises(ipuz.IPUZException) as cm:
#             ipuz.read(json.dumps(json_data), **kwargs)
#         self.assertEqual(str(cm.exception), expected_exception)
# 
#     def validate(self, expected_exception):
#         self.validate_puzzle(self.puzzle, expected_exception)


# Path: tests/test_wordsearch.py
from .test_ipuz import IPUZBaseTestCase


    def test_misses_is_dict_with_non_text_value(self):
        self.puzzle["misses"] = {"A": 3}
        self.validate("Invalid misses value found")

    def test_points_is_text(self):
        self.puzzle["points"] = 3
        self.validate("Invalid points value found")

    def test_time_is_integer(self):
        self.puzzle["time"] = "time"
        self.validate("Invalid time value found")

    def test_time_is_integer_and_not_bool(self):
        self.puzzle["time"] = True
        self.validate("Invalid time value found")

    def test_time_is_non_negative_integer(self):
        self.puzzle["time"] = -1
        self.validate("Invalid time value found")

    def test_showanswers_is_text(self):
        self.puzzle["showanswers"] = 3
        self.validate("Invalid showanswers value found")

    def test_dictionary_is_text_or_false(self):
        self.puzzle["dictionary"] = 3
        self.validate("Invalid dictionary value found")

    def test_dictionary_is_not_true(self):

        self.puzzle["dictionary"] = True