Skip to content

Commit

Permalink
use Faker instead of other helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
radeusgd committed Dec 14, 2023
1 parent a4ec0e0 commit 3ea7805
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 27 deletions.
12 changes: 5 additions & 7 deletions test/Table_Tests/src/IO/Excel_Spec.enso
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@ from Standard.Table import Table, Match_Columns, Excel, Excel_Range, Data_Format

from Standard.Table.Errors import Invalid_Column_Names, Duplicate_Output_Column_Names, Invalid_Location, Range_Exceeded, Existing_Data, Column_Count_Mismatch, Column_Name_Mismatch, Empty_Sheet_Error

from Standard.Test import Test, Test_Suite, Problems
from Standard.Test import Test, Test_Suite, Problems, Faker
import Standard.Test.Extensions

import Standard.Examples

import project.Util

polyglot java import org.enso.table_test_helpers.RandomHelpers

spec_fmt header file read_method sheet_count=5 =
Test.group header <|
Test.specify "should read a workbook in" <|
Expand Down Expand Up @@ -935,9 +933,9 @@ spec =
Test.specify "should be able to write and read a big XLSX file (>110MB)" pending=ci_pending <|
n = 10^6
IO.println "Generating big XLSX file "+Time_Of_Day.now.to_text
rng = RandomHelpers.new 123
faker = Faker.new 123
v = Vector.new n _->
rng.makeRandomString 190
faker.alpha_numeric 190
table = Table.new [["X", v]]
big_file = enso_project.data / "transient" / "big.xlsx"
big_file.delete_if_exists
Expand All @@ -961,12 +959,12 @@ spec =

Test.specify "should be able to write and read a big XLS file (>110MB)" pending=ci_pending <|
IO.println "Generating big XLS file "+Time_Of_Day.now.to_text
rng = RandomHelpers.new 123
faker = Faker.new 123
# Here we instead create a 2D table, because XLS has a limit of 65536 rows and 16k columns.
rows = 65000
cols = 20
table = Table.new <| Vector.new cols i->
v = Vector.new rows _-> rng.makeRandomString 100
v = Vector.new rows _-> faker.alpha_numeric 100
["col" + i.to_text, v]
big_file = enso_project.data / "transient" / "big.xls"
big_file.delete_if_exists
Expand Down

This file was deleted.

0 comments on commit 3ea7805

Please sign in to comment.