Skip to content

Commit

Permalink
Merge pull request #3967 from silx-kit/vasole-patch-1
Browse files Browse the repository at this point in the history
[CI] Test latest Python 3.12
  • Loading branch information
t20100 authored Nov 23, 2023
2 parents 08f9862 + ea7ca95 commit 9c0463e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
12 changes: 6 additions & 6 deletions ci/appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ environment:
VENV_TEST_DIR: "venv_test"

matrix:
# Python 3.8
- PYTHON_DIR: "C:\\Python38-x64"
# Python 3.9
- PYTHON_DIR: "C:\\Python39-x64"
QT_BINDING: "PyQt5"
WITH_GL_TEST: True
PIP_OPTIONS: "-q --pre"

# Python 3.9
- PYTHON_DIR: "C:\\Python39-x64"
# Python 3.12
- PYTHON_DIR: "C:\\Python312-x64"
QT_BINDING: "PySide6"
WITH_GL_TEST: False # OpenGL not working
PIP_OPTIONS: "-q --pre"

# Python 3.10
- PYTHON_DIR: "C:\\Python310-x64"
# Python 3.11
- PYTHON_DIR: "C:\\Python311-x64"
QT_BINDING: "PyQt6"
WITH_GL_TEST: False # OpenGL not working
PIP_OPTIONS: "-q"
Expand Down
2 changes: 1 addition & 1 deletion ci/requirements-pinned.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ pybind11 # Required to build pyopencl
# downloaded from https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyopencl
# Anyway, we don't test OpenCL on appveyor
pyopencl == 2020.3.1; sys_platform == 'win32' and python_version < '3.8'
pyopencl == 2022.1.6; sys_platform == 'win32' and python_version >= '3.8'
pyopencl == 2023.1.4; sys_platform == 'win32' and python_version >= '3.8'
36 changes: 18 additions & 18 deletions src/silx/gui/utils/testutils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# /*##########################################################################
#
# Copyright (c) 2016-2022 European Synchrotron Radiation Facility
# Copyright (c) 2016-2023 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
Expand All @@ -25,7 +25,7 @@

__authors__ = ["T. Vincent"]
__license__ = "MIT"
__date__ = "22/07/2022"
__date__ = "22/11/2023"


import gc
Expand Down Expand Up @@ -138,23 +138,23 @@ def setUp(self):
self.__class__._exceptions = []

def _currentTestSucceeded(self):
if hasattr(self, '_outcome'):
if hasattr(self, '_feedErrorsToResult'):
# For Python 3.4 -3.10
result = self.defaultTestResult() # these 2 methods have no side effects
if hasattr(self._outcome, 'errors'):
self._feedErrorsToResult(result, self._outcome.errors)
else:
# Python 3.11+
result = self._outcome.result
if hasattr(self, '_feedErrorsToResult'):
# Python 3.4 - 3.10 (These two methods have no side effects)
result = self.defaultTestResult()
if hasattr(self._outcome, 'errors'):
self._feedErrorsToResult(result, self._outcome.errors)
elif hasattr(self._outcome, "result"):
# Python 3.11+
result = self._outcome.result

if self._outcome is None:
return True
elif hasattr(self._outcome, "success"):
# using pytest
return self._outcome.success
else:
# For Python < 3.4
result = getattr(self, '_outcomeForDoCleanups', self._resultForDoCleanups)

skipped = self.id() in [case.id() for case, _ in result.skipped]
error = self.id() in [case.id() for case, _ in result.errors]
failure = self.id() in [case.id() for case, _ in result.failures]
return not error and not failure and not skipped
# using unittest
return all(test != self for test, text in result.errors + result.failures)

def _checkForUnreleasedWidgets(self):
"""Test fixture checking that no more widgets exists."""
Expand Down

0 comments on commit 9c0463e

Please sign in to comment.