From 09b7a0e3d6d90a02e690fecc5e342f1428a76827 Mon Sep 17 00:00:00 2001 From: Gabor Schulz Date: Tue, 27 Dec 2022 19:07:44 +0100 Subject: [PATCH] Fixed test failure in Python 3.7 --- tests/tests.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tests/tests.py b/tests/tests.py index ffe132bb1..0c1558668 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -1113,11 +1113,19 @@ def test_load_extended_settings(self): self.assertEqual(True, zappa_cli.stage_config["touch"]) self.assertIn("x86_64", zappa_cli.architecture) - zappa_cli = ZappaCLI() - zappa_cli.api_stage = "arch_arm64" - zappa_cli.load_settings("test_settings.json") - self.assertIn("arm64", zappa_cli.stage_config["architecture"]) - self.assertIn("arm64", zappa_cli.architecture) + if sys.version_info.major == 3 and sys.version_info.minor < 8: + with self.assertRaises(ValueError): + zappa_cli = ZappaCLI() + zappa_cli.api_stage = "arch_arm64" + zappa_cli.load_settings("test_settings.json") + self.assertIn("arm64", zappa_cli.stage_config["architecture"]) + self.assertIn("arm64", zappa_cli.architecture) + else: + zappa_cli = ZappaCLI() + zappa_cli.api_stage = "arch_arm64" + zappa_cli.load_settings("test_settings.json") + self.assertIn("arm64", zappa_cli.stage_config["architecture"]) + self.assertIn("arm64", zappa_cli.architecture) zappa_cli = ZappaCLI() zappa_cli.api_stage = "extendofail"