File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ def gunzip(filename):
28
28
import shutil
29
29
import gzip
30
30
31
- # @EP 09/01/20: system-wide 'gzip' was removed, Python gzip used instead.
31
+ # system-wide 'gzip' was removed, Python gzip used instead.
32
32
# See #1538 : https://github.com/astropy/astroquery/issues/1538
33
33
34
34
if not filename .endswith ('.fz' ):
Original file line number Diff line number Diff line change 1
1
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2
- """Test `astroquery.utils.system_tools`.
3
2
4
- """
3
+ try :
4
+ import gzip
5
+ HAS_GZIP = True
6
+ except ImportError :
7
+ HAS_GZIP = False
5
8
6
- # STDLIB
7
- import gzip
8
9
import os
9
10
from os .path import exists
10
11
import tempfile
11
12
12
- # THIRD-PARTY
13
13
import pytest
14
14
15
- # LOCAL
16
15
from ..system_tools import gunzip
17
16
18
17
18
+ @pytest .mark .skipif ('not HAS_GZIP' )
19
19
def test_gunzip ():
20
20
filehandle = tempfile .NamedTemporaryFile (suffix = '.txt.gz' )
21
21
filename = filehandle .name
You can’t perform that action at this time.
0 commit comments