Skip to content

Commit 7b1c1d8

Browse files
committed
Parametrize test
1 parent 9543c4c commit 7b1c1d8

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
@@ -539,10 +539,12 @@ def test_to_csv_compression(self, compression_only,
539539
compression=read_compression)
540540
tm.assert_frame_equal(result, df)
541541

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

0 commit comments

Comments
 (0)