Skip to content

Commit

Permalink
Move distutils LooseVersion to packaging.version
Browse files Browse the repository at this point in the history
  • Loading branch information
CyclingNinja committed Sep 5, 2024
1 parent 8431450 commit b5f8d7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sunkit_instruments/rhessi/tests/test_rhessi.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import platform
import textwrap
from distutils.version import LooseVersion
from packaging.version import Version
from unittest import mock

import numpy as np
Expand Down Expand Up @@ -138,7 +138,7 @@ def test_parse_observing_summary_dbase_file_mock():
summary database file mocked in ``hessi_data()``.
"""
# We need to mock this test differently for <= 3.7.0 and below.
if LooseVersion(platform.python_version()) <= LooseVersion("3.7.0"):
if Version(platform.python_version()) <= Version("3.7.0"):
mock_file = mock.mock_open()
mock_file.return_value.__iter__.return_value = hessi_data().splitlines()
else:
Expand Down

0 comments on commit b5f8d7e

Please sign in to comment.