Skip to content

Commit 6649157

Browse files
abarber4ghjreback
authored andcommitted
TST: ujson tests are not being run (pandas-dev#16499) (pandas-dev#16500)
closes pandas-dev#16499
1 parent b0d9ee0 commit 6649157

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

pandas/tests/io/json/test_ujson.py

+22-22
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
else partial(json.dumps, encoding="utf-8"))
2828

2929

30-
class UltraJSONTests(object):
30+
class TestUltraJSONTests(object):
3131

3232
@pytest.mark.skipif(compat.is_platform_32bit(),
3333
reason="not compliant on 32-bit, xref #15865")
@@ -944,19 +944,19 @@ def my_obj_handler(obj):
944944
ujson.decode(ujson.encode(l, default_handler=str)))
945945

946946

947-
class NumpyJSONTests(object):
947+
class TestNumpyJSONTests(object):
948948

949-
def testBool(self):
949+
def test_Bool(self):
950950
b = np.bool(True)
951951
assert ujson.decode(ujson.encode(b)) == b
952952

953-
def testBoolArray(self):
953+
def test_BoolArray(self):
954954
inpt = np.array([True, False, True, True, False, True, False, False],
955955
dtype=np.bool)
956956
outp = np.array(ujson.decode(ujson.encode(inpt)), dtype=np.bool)
957957
tm.assert_numpy_array_equal(inpt, outp)
958958

959-
def testInt(self):
959+
def test_Int(self):
960960
num = np.int(2562010)
961961
assert np.int(ujson.decode(ujson.encode(num))) == num
962962

@@ -984,7 +984,7 @@ def testInt(self):
984984
num = np.uint64(2562010)
985985
assert np.uint64(ujson.decode(ujson.encode(num))) == num
986986

987-
def testIntArray(self):
987+
def test_IntArray(self):
988988
arr = np.arange(100, dtype=np.int)
989989
dtypes = (np.int, np.int8, np.int16, np.int32, np.int64,
990990
np.uint, np.uint8, np.uint16, np.uint32, np.uint64)
@@ -993,7 +993,7 @@ def testIntArray(self):
993993
outp = np.array(ujson.decode(ujson.encode(inpt)), dtype=dtype)
994994
tm.assert_numpy_array_equal(inpt, outp)
995995

996-
def testIntMax(self):
996+
def test_IntMax(self):
997997
num = np.int(np.iinfo(np.int).max)
998998
assert np.int(ujson.decode(ujson.encode(num))) == num
999999

@@ -1023,7 +1023,7 @@ def testIntMax(self):
10231023
num = np.uint64(np.iinfo(np.int64).max)
10241024
assert np.uint64(ujson.decode(ujson.encode(num))) == num
10251025

1026-
def testFloat(self):
1026+
def test_Float(self):
10271027
num = np.float(256.2013)
10281028
assert np.float(ujson.decode(ujson.encode(num))) == num
10291029

@@ -1033,7 +1033,7 @@ def testFloat(self):
10331033
num = np.float64(256.2013)
10341034
assert np.float64(ujson.decode(ujson.encode(num))) == num
10351035

1036-
def testFloatArray(self):
1036+
def test_FloatArray(self):
10371037
arr = np.arange(12.5, 185.72, 1.7322, dtype=np.float)
10381038
dtypes = (np.float, np.float32, np.float64)
10391039

@@ -1043,7 +1043,7 @@ def testFloatArray(self):
10431043
inpt, double_precision=15)), dtype=dtype)
10441044
tm.assert_almost_equal(inpt, outp)
10451045

1046-
def testFloatMax(self):
1046+
def test_FloatMax(self):
10471047
num = np.float(np.finfo(np.float).max / 10)
10481048
tm.assert_almost_equal(np.float(ujson.decode(
10491049
ujson.encode(num, double_precision=15))), num, 15)
@@ -1056,7 +1056,7 @@ def testFloatMax(self):
10561056
tm.assert_almost_equal(np.float64(ujson.decode(
10571057
ujson.encode(num, double_precision=15))), num, 15)
10581058

1059-
def testArrays(self):
1059+
def test_Arrays(self):
10601060
arr = np.arange(100)
10611061

10621062
arr = arr.reshape((10, 10))
@@ -1097,13 +1097,13 @@ def testArrays(self):
10971097
outp = ujson.decode(ujson.encode(arr), numpy=True, dtype=np.float32)
10981098
tm.assert_almost_equal(arr, outp)
10991099

1100-
def testOdArray(self):
1100+
def test_OdArray(self):
11011101
def will_raise():
11021102
ujson.encode(np.array(1))
11031103

11041104
pytest.raises(TypeError, will_raise)
11051105

1106-
def testArrayNumpyExcept(self):
1106+
def test_ArrayNumpyExcept(self):
11071107

11081108
input = ujson.dumps([42, {}, 'a'])
11091109
try:
@@ -1186,7 +1186,7 @@ def testArrayNumpyExcept(self):
11861186
except:
11871187
assert False, "Wrong exception"
11881188

1189-
def testArrayNumpyLabelled(self):
1189+
def test_ArrayNumpyLabelled(self):
11901190
input = {'a': []}
11911191
output = ujson.loads(ujson.dumps(input), numpy=True, labelled=True)
11921192
assert (np.empty((1, 0)) == output[0]).all()
@@ -1220,9 +1220,9 @@ def testArrayNumpyLabelled(self):
12201220
assert (np.array(['a', 'b']) == output[2]).all()
12211221

12221222

1223-
class PandasJSONTests(object):
1223+
class TestPandasJSONTests(object):
12241224

1225-
def testDataFrame(self):
1225+
def test_DataFrame(self):
12261226
df = DataFrame([[1, 2, 3], [4, 5, 6]], index=[
12271227
'a', 'b'], columns=['x', 'y', 'z'])
12281228

@@ -1252,7 +1252,7 @@ def testDataFrame(self):
12521252
tm.assert_index_equal(df.transpose().columns, outp.columns)
12531253
tm.assert_index_equal(df.transpose().index, outp.index)
12541254

1255-
def testDataFrameNumpy(self):
1255+
def test_DataFrameNumpy(self):
12561256
df = DataFrame([[1, 2, 3], [4, 5, 6]], index=[
12571257
'a', 'b'], columns=['x', 'y', 'z'])
12581258

@@ -1275,7 +1275,7 @@ def testDataFrameNumpy(self):
12751275
tm.assert_index_equal(df.transpose().columns, outp.columns)
12761276
tm.assert_index_equal(df.transpose().index, outp.index)
12771277

1278-
def testDataFrameNested(self):
1278+
def test_DataFrameNested(self):
12791279
df = DataFrame([[1, 2, 3], [4, 5, 6]], index=[
12801280
'a', 'b'], columns=['x', 'y', 'z'])
12811281

@@ -1301,7 +1301,7 @@ def testDataFrameNested(self):
13011301
'df2': ujson.decode(ujson.encode(df, orient="split"))}
13021302
assert ujson.decode(ujson.encode(nested, orient="split")) == exp
13031303

1304-
def testDataFrameNumpyLabelled(self):
1304+
def test_DataFrameNumpyLabelled(self):
13051305
df = DataFrame([[1, 2, 3], [4, 5, 6]], index=[
13061306
'a', 'b'], columns=['x', 'y', 'z'])
13071307

@@ -1324,7 +1324,7 @@ def testDataFrameNumpyLabelled(self):
13241324
tm.assert_index_equal(df.columns, outp.columns)
13251325
tm.assert_index_equal(df.index, outp.index)
13261326

1327-
def testSeries(self):
1327+
def test_Series(self):
13281328
s = Series([10, 20, 30, 40, 50, 60], name="series",
13291329
index=[6, 7, 8, 9, 10, 15]).sort_values()
13301330

@@ -1372,7 +1372,7 @@ def testSeries(self):
13721372
s, orient="index"), numpy=True)).sort_values()
13731373
tm.assert_series_equal(outp, exp)
13741374

1375-
def testSeriesNested(self):
1375+
def test_SeriesNested(self):
13761376
s = Series([10, 20, 30, 40, 50, 60], name="series",
13771377
index=[6, 7, 8, 9, 10, 15]).sort_values()
13781378

@@ -1398,7 +1398,7 @@ def testSeriesNested(self):
13981398
's2': ujson.decode(ujson.encode(s, orient="index"))}
13991399
assert ujson.decode(ujson.encode(nested, orient="index")) == exp
14001400

1401-
def testIndex(self):
1401+
def test_Index(self):
14021402
i = Index([23, 45, 18, 98, 43, 11], name="index")
14031403

14041404
# column indexed

0 commit comments

Comments
 (0)