diff options
author | Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> | 2019-07-09 10:20:39 +0200 |
---|---|---|
committer | Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> | 2019-07-09 10:20:39 +0200 |
commit | 032cc0bed452e96456cdc499f98ccaf473416978 (patch) | |
tree | 514f4532d1ab4dcbea0495488e6dd30bc422a94b /silx/test/utils.py | |
parent | 8ff15764a99df31a5d75e1e19a89b413408cfcc2 (diff) | |
parent | 654a6ac93513c3cc1ef97cacd782ff674c6f4559 (diff) |
Update upstream source from tag 'upstream/0.11.0+dfsg'
Update to upstream version '0.11.0+dfsg'
with Debian dir 711605a3a57c11c3b5d699da5819c94403f8ac62
Diffstat (limited to 'silx/test/utils.py')
-rw-r--r-- | silx/test/utils.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/silx/test/utils.py b/silx/test/utils.py index 12bede9..77746c6 100644 --- a/silx/test/utils.py +++ b/silx/test/utils.py @@ -1,7 +1,7 @@ # coding: utf-8 # /*########################################################################## # -# Copyright (c) 2016-2017 European Synchrotron Radiation Facility +# Copyright (c) 2016-2019 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 @@ -96,6 +96,15 @@ class _TestOptions(object): elif os.environ.get('WITH_GL_TEST', 'True') == 'False': self.WITH_GL_TEST = False self.WITH_GL_TEST_REASON = "Skipped by WITH_GL_TEST env var" + elif sys.platform.startswith('linux') and not os.environ.get('DISPLAY', ''): + self.WITH_GL_TEST = False + self.WITH_GL_TEST_REASON = "DISPLAY env variable not set" + else: + try: + import OpenGL + except ImportError: + self.WITH_GL_TEST = False + self.WITH_GL_TEST_REASON = "OpenGL package not available" if (parsed_options is not None and parsed_options.low_mem) or os.environ.get('SILX_TEST_LOW_MEM', 'True') == 'False': self.TEST_LOW_MEM = True |