Skip to content

Commit

Permalink
Merge pull request #1969 from kif/1961_python_312
Browse files Browse the repository at this point in the history
Fix tests for python 3.12
  • Loading branch information
kif authored Oct 5, 2023
2 parents 2a5b4c3 + 23fbe22 commit 3db31cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
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

0 comments on commit 3db31cd

Please sign in to comment.