diff --git a/tests/utils_tests/test_timezone.py b/tests/utils_tests/test_timezone.py index 9dc7941b4b..1be1d63b2c 100644 --- a/tests/utils_tests/test_timezone.py +++ b/tests/utils_tests/test_timezone.py @@ -193,8 +193,14 @@ class TimezoneTests(SimpleTestCase): pytz.timezone("Asia/Bangkok").localize(datetime.datetime(2011, 9, 1, 17, 20, 30)), CET ), datetime.datetime(2011, 9, 1, 12, 20, 30)) - with self.assertRaises(ValueError): - timezone.make_naive(datetime.datetime(2011, 9, 1, 12, 20, 30), CET) + if PY36: + self.assertEqual( + timezone.make_naive(datetime.datetime(2011, 9, 1, 12, 20, 30), CET), + datetime.datetime(2011, 9, 1, 19, 20, 30) + ) + else: + with self.assertRaises(ValueError): + timezone.make_naive(datetime.datetime(2011, 9, 1, 12, 20, 30), CET) @requires_pytz def test_make_aware_pytz_ambiguous(self):