Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated failing tests and style issues
  • Loading branch information
Mike Ronayne committed Apr 30, 2021
commit ec11e7df87b169c4239b069e547cd6533d3a7438
23 changes: 11 additions & 12 deletions pandas/tests/io/formats/test_to_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ def test_format_remove_leading_space_dataframe(input_array, expected):
(
None,
2,
" 0 1 2 3 4 6 7 8 9 10 11\n"
" 0 0 0 0 0 0 0 0 0 0 0\n"
" .. .. .. .. .. .. .. .. .. .. ..\n"
" 0 0 0 0 0 0 0 0 0 0 0",
" 0 1 2 3 4 5 6 7 8 9 10 11\n"
" 0 0 0 0 0 0 0 0 0 0 0 0\n"
" .. .. .. .. .. .. .. .. .. .. .. ..\n"
" 0 0 0 0 0 0 0 0 0 0 0 0",
),
(
10,
Expand All @@ -145,18 +145,13 @@ def test_format_remove_leading_space_dataframe(input_array, expected):
(
1,
1,
" 0 ...\n"
" 0 ...\n"
".. ...",
" 0 ...\n 0 ...\n.. ...",
),
],
)
def test_truncation_no_index(max_cols, max_rows, expected):
df = DataFrame([[0] * 11] * 4)
assert (
df.to_string(index=False, max_cols=max_cols, max_rows=max_rows)
== expected
)
assert df.to_string(index=False, max_cols=max_cols, max_rows=max_rows) == expected


def test_to_string_unicode_columns(float_frame):
Expand Down Expand Up @@ -239,7 +234,11 @@ def format_func(x):

def test_to_string_with_datetime64_hourformatter():
x = DataFrame(
{"hod": to_datetime(["10:10:10.100", "12:12:12.120"], format="%H:%M:%S.%f")}
{
"hod": to_datetime(
["10:10:10.100", "12:12:12.120"], format="%H:%M:%S.%f"
)
}
)

def format_func(x):
Expand Down