Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions tests/test_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -1996,6 +1996,20 @@ def test_num_columns(table):
number = table.num_columns
assert number == 3

def test_split(table):
"""Test that split copies over the _formats variable from the original table to the new tables correctly after splitting"""

#defined a custom formatter for points column
def positive_point_formatter(value):
return f"+{value}"

table.set_format("points", positive_point_formatter)

t1, t2 = table.split(2)

assert t1._formats == table._formats
assert t2._formats == table._formats

def test_with_columns(table):
"""Test that with_columns returns self if no labels_and_values passed"""
t = table.with_columns()
Expand Down
Loading