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:
