Skip to content

Commit 8adc42c

Browse files
committed
Parametrize test
1 parent 8f1d860 commit 8adc42c

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
@@ -564,10 +564,12 @@ def test_to_csv_compression(self, compression_only,
564564
compression=read_compression)
565565
tm.assert_frame_equal(result, df)
566566

567-
def test_to_csv_na_rep_long_string(self):
567+
@pytest.mark.parametrize("df_value", [float('nan')])
568+
@pytest.mark.parametrize("df_new_type", ["Int64"])
569+
def test_to_csv_na_rep_long_string(self, df_value, df_new_type):
568570
# see gh-25099
569-
df = pd.DataFrame({"c": [float('nan')] * 3})
570-
df = df.astype("Int64")
571+
df = pd.DataFrame({"c": [df_value] * 3})
572+
df = df.astype(df_new_type)
571573
expected_rows = ['c',
572574
'mynull',
573575
'mynull',

0 commit comments

Comments
 (0)