Skip to content

Commit

Permalink
Adjust test for Python 3.13 (#164)
Browse files Browse the repository at this point in the history
* Update ci_workflows.yml

* Update test_compmixin.py for Python 3.13
  • Loading branch information
pllim authored Sep 16, 2024
1 parent e2b1a28 commit 1e1d293
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13-dev'
- name: Install and build
run: |
python -m pip install --upgrade pip wheel setuptools
Expand Down
3 changes: 3 additions & 0 deletions lib/stsci/tools/tests/test_compmixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ def _compare(self, other, method):
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:
Expand Down

0 comments on commit 1e1d293

Please sign in to comment.