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.
This commit is contained in:
parent
8578e39c12
commit
76017ac269
3
setup.py
3
setup.py
@ -262,6 +262,7 @@ class test(Command):
|
|||||||
description = "run all unit tests"
|
description = "run all unit tests"
|
||||||
user_options = []
|
user_options = []
|
||||||
|
|
||||||
|
|
||||||
def initialize_options(self):
|
def initialize_options(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -269,6 +270,8 @@ class test(Command):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def run(self):
|
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'] = '.'
|
os.environ['GRAMPS_RESOURCES'] = '.'
|
||||||
all_tests = unittest.TestLoader().discover('.', pattern='*_test.py')
|
all_tests = unittest.TestLoader().discover('.', pattern='*_test.py')
|
||||||
unittest.TextTestRunner(verbosity=self.verbose).run(all_tests)
|
unittest.TextTestRunner(verbosity=self.verbose).run(all_tests)
|
||||||
|
Loading…
Reference in New Issue
Block a user