Add missing tests (#9897)

* Add missing tests

* Fix

* Fix tests
This commit is contained in:
AdRiley 2024-05-09 17:47:31 +03:00 committed by GitHub
parent 147c1cf99f
commit 55be1057fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 14 deletions

View File

@ -7,6 +7,7 @@ import project.In_Memory.Builders_Spec
import project.In_Memory.Column_Spec
import project.In_Memory.Column_Format_Spec
import project.In_Memory.Common_Spec
import project.In_Memory.Fan_Out_Spec
import project.In_Memory.Integer_Overflow_Spec
import project.In_Memory.Lossy_Conversions_Spec
import project.In_Memory.Parse_To_Table_Spec
@ -16,26 +17,29 @@ import project.In_Memory.Table_Xml_Spec
import project.In_Memory.Table_Conversion_Spec
import project.In_Memory.Table_Date_Spec
import project.In_Memory.Table_Date_Time_Spec
import project.In_Memory.Table_Format_Spec
import project.In_Memory.Table_Time_Of_Day_Spec
import project.In_Memory.Table_Running_Spec
add_specs suite_builder =
Table_Spec.add_specs suite_builder
Table_Xml_Spec.add_specs suite_builder
Column_Spec.add_specs suite_builder
Aggregate_Column_Spec.add_specs suite_builder
Builders_Spec.add_specs suite_builder
Column_Format_Spec.add_specs suite_builder
Column_Spec.add_specs suite_builder
Common_Spec.add_specs suite_builder
Fan_Out_Spec.add_specs suite_builder
Integer_Overflow_Spec.add_specs suite_builder
Lossy_Conversions_Spec.add_specs suite_builder
Parse_To_Table_Spec.add_specs suite_builder
Split_Tokenize_Spec.add_specs suite_builder
Table_Conversion_Spec.add_specs suite_builder
Table_Date_Spec.add_specs suite_builder
Table_Date_Time_Spec.add_specs suite_builder
Table_Time_Of_Day_Spec.add_specs suite_builder
Table_Format_Spec.add_specs suite_builder
Table_Running_Spec.add_specs suite_builder
Aggregate_Column_Spec.add_specs suite_builder
Builders_Spec.add_specs suite_builder
Split_Tokenize_Spec.add_specs suite_builder
Parse_To_Table_Spec.add_specs suite_builder
Table_Spec.add_specs suite_builder
Table_Time_Of_Day_Spec.add_specs suite_builder
Table_Xml_Spec.add_specs suite_builder
main filter=Nothing =
suite = Test.build suite_builder->

View File

@ -101,11 +101,11 @@ add_specs suite_builder =
actual.at "times" . should_equal expected_times
check_unchanged data.table actual ["bools", "ints", "floats", "strings", "date_formats", "time_formats", "numeric_formats", "bool_formats"]
group_builder.specify "Date and Date_Time, with Nothing format" <|
group_builder.specify "Date and Date_Time, with no format provided" <|
expected_dates = Column.from_vector "dates" ["2020-12-21", "2023-04-25"]
expected_datetimes = Column.from_vector "datetimes" ['2020-01-10 03:04:05Z[UTC]', '2020-08-08 05:06:07Z[UTC]']
expected_times = Column.from_vector "times" ["01:02:03", "10:30:35"]
actual = data.table.format ["dates", "datetimes", "times"] Nothing
actual = data.table.format ["dates", "datetimes", "times"]
actual.column_names . should_equal data.table.column_names
actual.at "dates" . should_equal expected_dates
actual.at "datetimes" . should_equal expected_datetimes
@ -134,9 +134,9 @@ add_specs suite_builder =
actual.at "bools" . should_equal expected_bools
check_unchanged data.table actual ["dates", "datetimes", "times", "ints", "floats", "strings", "date_formats", "time_formats", "numeric_formats", "bool_formats"]
group_builder.specify "Booleans, with format Nothing format" <|
group_builder.specify "Booleans, with no format provided" <|
expected_bools = Column.from_vector "bools" ["True", "False"]
actual = data.table.format ["bools"] Nothing
actual = data.table.format ["bools"]
actual.column_names . should_equal data.table.column_names
actual.at "bools" . should_equal expected_bools
check_unchanged data.table actual ["dates", "datetimes", "times", "ints", "floats", "strings", "date_formats", "time_formats", "numeric_formats", "bool_formats"]
@ -169,10 +169,10 @@ add_specs suite_builder =
actual.at "floats" . should_equal expected_floats
check_unchanged data.table actual ["dates", "datetimes", "times", "bools", "strings", "date_formats", "time_formats", "numeric_formats", "bool_formats"]
group_builder.specify "Ints and floats, with Nothing format" <|
group_builder.specify "Ints and floats, with no format provided" <|
expected_ints = Column.from_vector "ints" ["100000000", "2222"]
expected_floats = Column.from_vector "floats" ['2.000000009E8', '4444.3']
actual = data.table.format ["ints", "floats"] Nothing
actual = data.table.format ["ints", "floats"]
actual.column_names . should_equal data.table.column_names
actual.at "ints" . should_equal expected_ints
actual.at "floats" . should_equal expected_floats