From 3f6339271d0e05a1cfbc78ab6bc28af22c33a745 Mon Sep 17 00:00:00 2001 From: Andrew Halberstadt Date: Tue, 2 Jul 2019 20:59:03 +0000 Subject: [PATCH] Bug 1473498 - [mach] Enable test_config with Python 3 r=firefox-build-system-reviewers,chmanchester Depends on D36100 Differential Revision: https://phabricator.services.mozilla.com/D36101 --HG-- extra : moz-landing-system : lando --- python/mach/mach/test/python.ini | 1 - python/mach/mach/test/test_config.py | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/mach/mach/test/python.ini b/python/mach/mach/test/python.ini index fa00c644568d..c44b0acb89b0 100644 --- a/python/mach/mach/test/python.ini +++ b/python/mach/mach/test/python.ini @@ -4,7 +4,6 @@ subsuite = mach [test_conditions.py] skip-if = python == 3 [test_config.py] -skip-if = python == 3 [test_dispatcher.py] [test_entry_point.py] [test_error_output.py] diff --git a/python/mach/mach/test/test_config.py b/python/mach/mach/test/test_config.py index 36d3c427b9d5..4d3778d6882a 100644 --- a/python/mach/mach/test/test_config.py +++ b/python/mach/mach/test/test_config.py @@ -140,7 +140,8 @@ class TestConfigSettings(unittest.TestCase): a = s.a # Assigning an undeclared setting raises. - with self.assertRaises(AttributeError): + exc_type = AttributeError if sys.version_info < (3, 0) else KeyError + with self.assertRaises(exc_type): a.undefined = True with self.assertRaises(KeyError):