Skip to content

Commit 8e800fe

Browse files
committed
Minor cleanup
1 parent 14d21fb commit 8e800fe

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

astroquery/utils/system_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def gunzip(filename):
2828
import shutil
2929
import gzip
3030

31-
# @EP 09/01/20: system-wide 'gzip' was removed, Python gzip used instead.
31+
# system-wide 'gzip' was removed, Python gzip used instead.
3232
# See #1538 : https://github.com/astropy/astroquery/issues/1538
3333

3434
if not filename.endswith('.fz'):

astroquery/utils/tests/test_system_tools.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2-
"""Test `astroquery.utils.system_tools`.
32

4-
"""
3+
try:
4+
import gzip
5+
HAS_GZIP = True
6+
except ImportError:
7+
HAS_GZIP = False
58

6-
# STDLIB
7-
import gzip
89
import os
910
from os.path import exists
1011
import tempfile
1112

12-
# THIRD-PARTY
1313
import pytest
1414

15-
# LOCAL
1615
from ..system_tools import gunzip
1716

1817

18+
@pytest.mark.skipif('not HAS_GZIP')
1919
def test_gunzip():
2020
filehandle = tempfile.NamedTemporaryFile(suffix='.txt.gz')
2121
filename = filehandle.name

0 commit comments

Comments
 (0)