Skip to content

Commit

Permalink
fix vis test
Browse files Browse the repository at this point in the history
  • Loading branch information
radeusgd committed Mar 8, 2023
1 parent 04157df commit 6c0fd58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ prepare_visualization y max_rows=1000 = Helpers.recover_errors <|
dataframe = x.take (First max_rows)
all_rows_count = x.row_count
included_rows = dataframe.row_count
index = Dataframe_Column.from_vector "" (Vector.new included_rows i->i)
index = Dataframe_Column.from_vector "#" (Vector.new included_rows i->i)

make_json dataframe [index] all_rows_count

Expand Down
4 changes: 2 additions & 2 deletions test/Visualization_Tests/src/Table_Spec.enso
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ visualization_spec connection =
t2 = Table.new [["A", [1, 2, 3]], ["B", [4, 5, 6]], ["C", [7, 8, 9]]]
Test.specify "should visualize dataframe tables" <|
vis = Visualization.prepare_visualization t2 1
json = make_json header=["A", "B", "C"] data=[[1], [4], [7]] all_rows=3 ixes_header=[""] ixes=[[0]]
json = make_json header=["A", "B", "C"] data=[[1], [4], [7]] all_rows=3 ixes_header=["#"] ixes=[[0]]
vis . should_equal json

Test.specify "should visualize dataframe columns" <|
vis = Visualization.prepare_visualization (t2.at "A") 2
json = make_json header=["A"] data=[[1, 2]] all_rows=3 ixes_header=[""] ixes=[[0, 1]]
json = make_json header=["A"] data=[[1, 2]] all_rows=3 ixes_header=["#"] ixes=[[0, 1]]
vis . should_equal json

Test.specify "should handle Vectors" <|
Expand Down

0 comments on commit 6c0fd58

Please sign in to comment.