#1 Fix tests on Python 3.11
Merged 2 years ago by qulogic. Opened 2 years ago by qulogic.
rpms/ qulogic/python-gpxpy rawhide  into  rawhide

@@ -0,0 +1,29 @@ 

+ From 6d000c2ae7ccc1cd8074d1d90a05b77bbe1d57ad Mon Sep 17 00:00:00 2001

+ From: Elliott Sales de Andrade <quantum.analyst@gmail.com>

+ Date: Sun, 28 Nov 2021 23:51:46 -0500

+ Subject: [PATCH] Remove call to deprecated assertEquals

+ 

+ `assertEquals` was replaced by `assertEqual`, and the former has been

+ deleted from Python 3.11.

+ 

+ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

+ ---

+  test.py | 2 +-

+  1 file changed, 1 insertion(+), 1 deletion(-)

+ 

+ diff --git a/test.py b/test.py

+ index d37a87d..e24eb4f 100644

+ --- a/test.py

+ +++ b/test.py

+ @@ -3445,7 +3445,7 @@ class GPXTests(mod_unittest.TestCase):

+          gpx = mod_gpxpy.parse(xml)

+          gpx2 = self.reparse(gpx)

+          print(gpx2.to_xml())

+ -        self.assertEquals(207343, gpx2.tracks[0].segments[0].points[0].time.microsecond) # type: ignore

+ +        self.assertEqual(207343, gpx2.tracks[0].segments[0].points[0].time.microsecond)  # type: ignore

+          self.assertTrue("<time>1901-12-13T20:45:52.207343" in gpx2.to_xml())

+  

+      def test_split_tracks_without_gpxpy(self) -> None:

+ -- 

+ 2.31.1

+ 

file modified
+2
@@ -8,6 +8,8 @@ 

  License:        ASL 2.0

  URL:            https://github.com/tkrajina/gpxpy

  Source0:        %pypi_source

+ # https://github.com/tkrajina/gpxpy/pull/241

+ Patch0001:      0001-Remove-call-to-deprecated-assertEquals.patch

  

  BuildArch:      noarch

  

no initial comment

The build in COPR with Python 3.11 failed but this change is not the reason. I've resubmitted the build. And it's green: https://copr.fedorainfracloud.org/coprs/g/python/python3.11/build/2992376/

I see that you proposed the change upstream. Could you please add a comment with the link to the PR to the specfile?

rebased onto ab1bd1a

2 years ago

Pull-Request has been merged by qulogic

2 years ago