Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
radeusgd committed Feb 13, 2025
1 parent 95eb342 commit b0a2843
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1647,7 +1647,7 @@ add_column_operation_specs suite_builder setup =
data.c.text_replace "a" "#" . should_fail_with Invalid_Value_Type
Test.expect_panic Type_Error (data.a.text_replace 1 "#")
data.a.text_replace data.c "#" . should_fail_with Invalid_Value_Type
data.a.text_replace "a" 1 . should_fail_with Invalid_Value_Type
Test.expect_panic Type_Error (data.a.text_replace "a" 1)
data.a.text_replace "a" data.c . should_fail_with Invalid_Value_Type

group_builder.specify "should not replace if Empty term" <|
Expand Down Expand Up @@ -1695,7 +1695,7 @@ add_column_operation_specs suite_builder setup =

group_builder.specify "should only allow trim on Text columns" <|
data.c.trim what="a" . should_fail_with Invalid_Value_Type
data.a.trim what=1 . should_fail_with Invalid_Value_Type
Test.expect_panic Type_Error <| data.a.trim what=1
data.a.trim what=data.c . should_fail_with Invalid_Value_Type

suite_builder.group prefix+"(Column_Operations_Spec) Other Column Operations" group_builder->
Expand Down Expand Up @@ -1783,7 +1783,7 @@ add_column_operation_specs suite_builder setup =
t = table_builder [["a", [1, 2, 3]]]
c = t.at "a"

c.rename Nothing . should_fail_with Invalid_Column_Names
Test.expect_panic Type_Error <| c.rename Nothing
c.rename '' . should_fail_with Invalid_Column_Names
c.rename 'a\0b' . should_fail_with Invalid_Column_Names
c.rename '\0' . should_fail_with Invalid_Column_Names
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from Standard.Base import all
import Standard.Base.Errors.Common.Type_Error
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument

from Standard.Table import Table, Value_Type
Expand Down Expand Up @@ -494,7 +495,7 @@ add_specs suite_builder setup =

group_builder.specify "should check shift_amount type in date_add" <|
t = dates1.get
t.at "d_X" . date_add "text" Date_Period.Day . should_fail_with Invalid_Value_Type
Test.expect_panic Type_Error <| t.at "d_X" . date_add "text" Date_Period.Day

group_builder.specify "date_diff and date_add should work correctly with DST" pending="May be failing on some Database configurations. ToDo: investigate - https://github.com/enso-org/enso/issues/7326" <|
# TODO the behaviour here may differ between backends.
Expand Down

0 comments on commit b0a2843

Please sign in to comment.