From e76d3f91bff2c373318656f983510548c86ffb81 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Thu, 6 Mar 2014 15:37:47 -0800 Subject: [PATCH] Bug 7026: misleading diagnostics when locale resources aren't built This problem is from setup.py test, so ensure that there's a 'build' directory before running test. --- setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.py b/setup.py index 3f702ae7a..fc3c3f029 100644 --- a/setup.py +++ b/setup.py @@ -262,6 +262,7 @@ class test(Command): description = "run all unit tests" user_options = [] + def initialize_options(self): pass @@ -269,6 +270,8 @@ class test(Command): pass def run(self): + if not os.path.exists('build'): + raise RuntimeError("No build directory. Run `python setup.py build` before trying to run tests.") os.environ['GRAMPS_RESOURCES'] = '.' all_tests = unittest.TestLoader().discover('.', pattern='*_test.py') unittest.TextTestRunner(verbosity=self.verbose).run(all_tests)