File: Update-test_compmixin.py-for-Python-3.13.patch

package info (click to toggle)
pyraf 2.2.2-4~deb13u1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 2,664 kB
  • sloc: python: 24,944; ansic: 372; lisp: 76; makefile: 8
file content (26 lines) | stat: -rw-r--r-- 1,032 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: "P. L. Lim" <2090236+pllim@users.noreply.github.com>
Date: Mon, 16 Sep 2024 10:11:55 -0400
Subject: Update test_compmixin.py for Python 3.13

* Upstream URL: https://github.com/iraf-community/pyraf/pull/177
* Origin: https://github.com/spacetelescope/stsci.tools/pull/164

Closes: #1082695
---
 pyraf/tools/tests/test_compmixin.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pyraf/tools/tests/test_compmixin.py b/pyraf/tools/tests/test_compmixin.py
index eacc28f..5f04766 100644
--- a/pyraf/tools/tests/test_compmixin.py
+++ b/pyraf/tools/tests/test_compmixin.py
@@ -35,6 +35,9 @@ class AnyType(ComparableMixin):
         elif other is None:
             # coerce to str compare
             return method(str(self.val), '')
+        elif self.val is None:
+            # coerce to str compare
+            return method('', str(other))
         elif isinstance(other, int):
             # handle ONLY case where self.val is a single char or an int
             if isinstance(self.val, str) and len(self.val) == 1: