Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests for python 3.12 #1969

Merged
merged 2 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pyFAI/gui/utils/ProxyAction.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@

__authors__ = ["V. Valls"]
__license__ = "MIT"
__date__ = "16/10/2020"
__date__ = "05/10/2023"

from distutils.version import LooseVersion
def LooseVersion(version):
return tuple(int(i) for i in version.split(".") if i.isdecimal())

from silx.gui import qt

Expand Down
6 changes: 3 additions & 3 deletions pyFAI/test/test_calibrant.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,21 +146,21 @@ def test_not_same_dspace(self):
# this 2 calibrant must only be used there to test the lazy-loading
c1 = get_calibrant("LaB6_SRM660a")
c2 = get_calibrant("LaB6_SRM660b")
self.assertNotEquals(c1, c2)
self.assertNotEqual(c1, c2)

def test_not_same_wavelength(self):
c1 = get_calibrant("LaB6")
c1.set_wavelength(1e-10)
c2 = get_calibrant("LaB6")
self.assertNotEquals(c1, c2)
self.assertNotEqual(c1, c2)

def test_copy(self):
c1 = get_calibrant("AgBh")
c2 = copy.copy(c1)
self.assertIsNot(c1, c2)
self.assertEqual(c1, c2)
c2.set_wavelength(1e-10)
self.assertNotEquals(c1, c2)
self.assertNotEqual(c1, c2)

def test_hash(self):
c1 = get_calibrant("AgBh")
Expand Down
Loading