diff options
Diffstat (limited to 'run_tests.py')
-rwxr-xr-x | run_tests.py | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/run_tests.py b/run_tests.py index 6007344..5d3155a 100755 --- a/run_tests.py +++ b/run_tests.py @@ -1,8 +1,8 @@ -#!/usr/bin/env python -# coding: utf-8 +#!/usr/bin/env python3 +# coding: utf8 # /*########################################################################## # -# Copyright (c) 2015-2018 European Synchrotron Radiation Facility +# Copyright (c) 2015-2020 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -32,7 +32,7 @@ Test coverage dependencies: coverage, lxml. """ __authors__ = ["Jérôme Kieffer", "Thomas Vincent"] -__date__ = "02/03/2018" +__date__ = "30/09/2020" __license__ = "MIT" import distutils.util @@ -87,7 +87,6 @@ logger.setLevel(logging.WARNING) logger.info("Python %s %s", sys.version, tuple.__itemsize__ * 8) - try: import resource except ImportError: @@ -98,6 +97,7 @@ try: import importlib importer = importlib.import_module except ImportError: + def importer(name): module = __import__(name) # returns the leaf module, instead of the root module @@ -107,7 +107,6 @@ except ImportError: module = getattr(module, subname) return module - try: import numpy except Exception as error: @@ -350,11 +349,9 @@ if __name__ == "__main__": # Needed for multiprocessing support on Windows PROJECT_VERSION = getattr(project_module, 'version', '') PROJECT_PATH = project_module.__path__[0] - test_options = get_test_options(project_module) """Contains extra configuration for the tests.""" - epilog = """Environment variables: WITH_QT_TEST=False to disable graphical tests SILX_OPENCL=False to disable OpenCL tests @@ -393,7 +390,6 @@ if __name__ == "__main__": # Needed for multiprocessing support on Windows options = parser.parse_args() sys.argv = [sys.argv[0]] - test_verbosity = 1 use_buffer = True if options.verbose == 1: @@ -467,7 +463,6 @@ if __name__ == "__main__": # Needed for multiprocessing support on Windows else: logger.warning("No test options available.") - if not options.test_name: # Do not use test loader to avoid cryptic exception # when an error occur during import @@ -487,7 +482,6 @@ if __name__ == "__main__": # Needed for multiprocessing support on Windows else: exit_status = 1 - if options.coverage: cov.stop() cov.save() |