Skip to content

Commit c668252

Browse files
kinowBruno P. Kinoshita
authored and
Bruno P. Kinoshita
committed
Parametrize test
1 parent e55db21 commit c668252

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pandas/tests/io/formats/test_to_csv.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -518,10 +518,12 @@ def test_to_csv_compression(self, compression_only, read_infer, to_infer):
518518
result = pd.read_csv(path, index_col=0, compression=read_compression)
519519
tm.assert_frame_equal(result, df)
520520

521-
def test_to_csv_na_rep_long_string(self):
521+
@pytest.mark.parametrize("df_value", [float('nan')])
522+
@pytest.mark.parametrize("df_new_type", ["Int64"])
523+
def test_to_csv_na_rep_long_string(self, df_value, df_new_type):
522524
# see gh-25099
523-
df = pd.DataFrame({"c": [float('nan')] * 3})
524-
df = df.astype("Int64")
525+
df = pd.DataFrame({"c": [df_value] * 3})
526+
df = df.astype(df_new_type)
525527
expected_rows = ['c',
526528
'mynull',
527529
'mynull',

0 commit comments

Comments
 (0)