File tree Expand file tree Collapse file tree 3 files changed +41
-29
lines changed Expand file tree Collapse file tree 3 files changed +41
-29
lines changed Original file line number Diff line number Diff line change 1
1
from contextlib import contextmanager
2
- from distutils .version import LooseVersion
3
2
import os
4
3
import tempfile
5
4
6
- import numpy as np
7
- import pytest
8
-
9
5
from pandas .io .pytables import HDFStore
10
6
11
- # TODO:
12
- # remove when gh-24839 is fixed; this affects numpy 1.16
13
- # and pytables 3.4.4
14
- tables = pytest .importorskip ("tables" )
15
- xfail_non_writeable = pytest .mark .xfail (
16
- LooseVersion (np .__version__ ) >= LooseVersion ("1.16" )
17
- and LooseVersion (tables .__version__ ) < LooseVersion ("3.5.1" ),
18
- reason = (
19
- "gh-25511, gh-24839. pytables needs a "
20
- "release beyong 3.4.4 to support numpy 1.16x"
21
- ),
22
- )
23
-
24
- # set these parameters so we don't have file sharing
25
- tables .parameters .MAX_NUMEXPR_THREADS = 1
26
- tables .parameters .MAX_BLOSC_THREADS = 1
27
- tables .parameters .MAX_THREADS = 1
28
-
29
7
30
8
def safe_remove (path ):
31
9
if path is not None :
Original file line number Diff line number Diff line change
1
+ from distutils .version import LooseVersion
1
2
from warnings import catch_warnings
2
3
3
4
import numpy as np
4
5
import pytest
5
6
6
7
import pandas as pd
7
8
from pandas import DataFrame , Series
8
- from pandas .tests .io .pytables .common import (
9
- ensure_clean_path ,
10
- ensure_clean_store ,
11
- xfail_non_writeable ,
12
- )
9
+ from pandas .tests .io .pytables .common import ensure_clean_path , ensure_clean_store
13
10
import pandas .util .testing as tm
14
11
from pandas .util .testing import assert_frame_equal
15
12
16
13
from pandas .io .pytables import read_hdf
17
14
15
+ # TODO:
16
+ # remove when gh-24839 is fixed; this affects numpy 1.16
17
+ # and pytables 3.4.4
18
+ tables = pytest .importorskip ("tables" )
19
+ # set these parameters so we don't have file sharing
20
+ tables .parameters .MAX_NUMEXPR_THREADS = 1
21
+ tables .parameters .MAX_BLOSC_THREADS = 1
22
+ tables .parameters .MAX_THREADS = 1
23
+
24
+
25
+ xfail_non_writeable = pytest .mark .xfail (
26
+ LooseVersion (np .__version__ ) >= LooseVersion ("1.16" )
27
+ and LooseVersion (tables .__version__ ) < LooseVersion ("3.5.1" ),
28
+ reason = (
29
+ "gh-25511, gh-24839. pytables needs a "
30
+ "release beyong 3.4.4 to support numpy 1.16x"
31
+ ),
32
+ )
33
+
18
34
19
35
class TestHDFComplexValues :
20
36
# GH10447
Original file line number Diff line number Diff line change 39
39
ensure_clean_store ,
40
40
safe_close ,
41
41
safe_remove ,
42
- tables ,
43
- xfail_non_writeable ,
44
42
)
45
43
import pandas .util .testing as tm
46
44
from pandas .util .testing import assert_frame_equal , assert_series_equal
57
55
from pandas .io .pytables import TableIterator # noqa: E402 isort:skip
58
56
59
57
58
+ # TODO:
59
+ # remove when gh-24839 is fixed; this affects numpy 1.16
60
+ # and pytables 3.4.4
61
+ tables = pytest .importorskip ("tables" )
62
+ # set these parameters so we don't have file sharing
63
+ tables .parameters .MAX_NUMEXPR_THREADS = 1
64
+ tables .parameters .MAX_BLOSC_THREADS = 1
65
+ tables .parameters .MAX_THREADS = 1
66
+
67
+
68
+ xfail_non_writeable = pytest .mark .xfail (
69
+ LooseVersion (np .__version__ ) >= LooseVersion ("1.16" )
70
+ and LooseVersion (tables .__version__ ) < LooseVersion ("3.5.1" ),
71
+ reason = (
72
+ "gh-25511, gh-24839. pytables needs a "
73
+ "release beyong 3.4.4 to support numpy 1.16x"
74
+ ),
75
+ )
76
+
77
+
60
78
_default_compressor = "blosc"
61
79
ignore_natural_naming_warning = pytest .mark .filterwarnings (
62
80
"ignore:object name:tables.exceptions.NaturalNameWarning"
You can’t perform that action at this time.
0 commit comments