Skip to content

Commit dec7cec

Browse files
committed
Parametrize test
1 parent 814c7a2 commit dec7cec

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pandas/tests/io/formats/test_to_csv.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -540,10 +540,12 @@ def test_to_csv_compression(self, compression_only,
540540
compression=read_compression)
541541
tm.assert_frame_equal(result, df)
542542

543-
def test_to_csv_na_rep_long_string(self):
543+
@pytest.mark.parametrize("df_value", [float('nan')])
544+
@pytest.mark.parametrize("df_new_type", ["Int64"])
545+
def test_to_csv_na_rep_long_string(self, df_value, df_new_type):
544546
# see gh-25099
545-
df = pd.DataFrame({"c": [float('nan')] * 3})
546-
df = df.astype("Int64")
547+
df = pd.DataFrame({"c": [df_value] * 3})
548+
df = df.astype(df_new_type)
547549
expected_rows = ['c',
548550
'mynull',
549551
'mynull',

0 commit comments

Comments
 (0)