We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f7a8813 + 13a1165 commit 8717257Copy full SHA for 8717257
1 file changed
tests/test_tables.py
@@ -1996,6 +1996,20 @@ def test_num_columns(table):
1996
number = table.num_columns
1997
assert number == 3
1998
1999
+def test_split(table):
2000
+ """Test that split copies over the _formats variable from the original table to the new tables correctly after splitting"""
2001
+
2002
+ #defined a custom formatter for points column
2003
+ def positive_point_formatter(value):
2004
+ return f"+{value}"
2005
2006
+ table.set_format("points", positive_point_formatter)
2007
2008
+ t1, t2 = table.split(2)
2009
2010
+ assert t1._formats == table._formats
2011
+ assert t2._formats == table._formats
2012
2013
def test_with_columns(table):
2014
"""Test that with_columns returns self if no labels_and_values passed"""
2015
t = table.with_columns()
0 commit comments