Skip to content

Commit 09b81a1

Browse files
jorisvandenbosscheyeshsurya
authored andcommitted
[ArrayManager] TST: enable JSON tests (except for table schema) (pandas-dev#41075)
1 parent 88e94ab commit 09b81a1

File tree

6 files changed

+13
-19
lines changed

6 files changed

+13
-19
lines changed

pandas/tests/io/json/test_compression.py

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
import pandas as pd
88
import pandas._testing as tm
99

10-
pytestmark = td.skip_array_manager_not_yet_implemented
11-
1210

1311
def test_compression_roundtrip(compression):
1412
df = pd.DataFrame(

pandas/tests/io/json/test_deprecated_kwargs.py

-4
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@
22
Tests for the deprecated keyword arguments for `read_json`.
33
"""
44

5-
import pandas.util._test_decorators as td
6-
75
import pandas as pd
86
import pandas._testing as tm
97

108
from pandas.io.json import read_json
119

12-
pytestmark = td.skip_array_manager_not_yet_implemented
13-
1410

1511
def test_deprecated_kwargs():
1612
df = pd.DataFrame({"A": [2, 4, 6], "B": [3, 6, 9]}, index=[0, 1, 2])

pandas/tests/io/json/test_normalize.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515

1616
from pandas.io.json._normalize import nested_to_record
1717

18-
pytestmark = td.skip_array_manager_not_yet_implemented
19-
2018

2119
@pytest.fixture
2220
def deep_nested():
@@ -153,6 +151,8 @@ def test_simple_records(self):
153151

154152
tm.assert_frame_equal(result, expected)
155153

154+
# TODO(ArrayManager) sanitize S/U numpy dtypes to object
155+
@td.skip_array_manager_not_yet_implemented
156156
def test_simple_normalize(self, state_data):
157157
result = json_normalize(state_data[0], "counties")
158158
expected = DataFrame(state_data[0]["counties"])
@@ -372,6 +372,8 @@ def test_meta_parameter_not_modified(self):
372372
for val in ["metafoo", "metabar", "foo", "bar"]:
373373
assert val in result
374374

375+
# TODO(ArrayManager) sanitize S/U numpy dtypes to object
376+
@td.skip_array_manager_not_yet_implemented
375377
def test_record_prefix(self, state_data):
376378
result = json_normalize(state_data[0], "counties")
377379
expected = DataFrame(state_data[0]["counties"])

pandas/tests/io/json/test_pandas.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
)
2828
import pandas._testing as tm
2929

30-
pytestmark = td.skip_array_manager_not_yet_implemented
31-
32-
3330
_seriesd = tm.getSeriesData()
3431

3532
_frame = DataFrame(_seriesd)
@@ -318,7 +315,13 @@ def test_roundtrip_mixed(self, request, orient, convert_axes, numpy):
318315
'{"columns":["A","B"],'
319316
'"index":["2","3"],'
320317
'"data":[[1.0,"1"],[2.0,"2"],[null,"3"]]}',
321-
r"Shape of passed values is \(3, 2\), indices imply \(2, 2\)",
318+
"|".join(
319+
[
320+
r"Shape of passed values is \(3, 2\), indices imply \(2, 2\)",
321+
"Passed arrays should have the same length as the rows Index: "
322+
"3 vs 2 rows",
323+
]
324+
),
322325
"split",
323326
),
324327
# too many columns
@@ -854,6 +857,8 @@ def test_convert_dates_infer(self, infer_word):
854857
result = read_json(dumps(data))[["id", infer_word]]
855858
tm.assert_frame_equal(result, expected)
856859

860+
# TODO(ArrayManager) JSON
861+
@td.skip_array_manager_not_yet_implemented
857862
@pytest.mark.parametrize(
858863
"date,date_unit",
859864
[

pandas/tests/io/json/test_readlines.py

-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
import pytest
55

6-
import pandas.util._test_decorators as td
7-
86
import pandas as pd
97
from pandas import (
108
DataFrame,
@@ -14,8 +12,6 @@
1412

1513
from pandas.io.json._json import JsonReader
1614

17-
pytestmark = td.skip_array_manager_not_yet_implemented
18-
1915

2016
@pytest.fixture
2117
def lines_json_df():

pandas/tests/io/json/test_ujson.py

-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
IS64,
1919
is_platform_windows,
2020
)
21-
import pandas.util._test_decorators as td
2221

2322
from pandas import (
2423
DataFrame,
@@ -32,8 +31,6 @@
3231
)
3332
import pandas._testing as tm
3433

35-
pytestmark = td.skip_array_manager_not_yet_implemented
36-
3734

3835
def _clean_dict(d):
3936
"""

0 commit comments

Comments
 (0)