MCPcopy Create free account
hub / github.com/pathwaycom/pathway / test_removal_of_error

Function test_removal_of_error

python/pathway/tests/test_errors.py:77–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75
76
77def test_removal_of_error():
78 t1 = T(
79 """
80 | a | b | __time__ | __diff__
81 1 | 6 | 2 | 2 | 1
82 2 | 5 | 0 | 4 | 1
83 3 | 4 | 2 | 6 | 1
84 2 | 5 | 0 | 8 | -1
85 """
86 )
87
88 t2 = t1.with_columns(c=pw.this.a // pw.this.b)
89
90 expected = T(
91 """
92 a | b | c
93 4 | 2 | 2
94 6 | 2 | 3
95 """
96 )
97 expected_errors = T(
98 """
99 message | line
100 division by zero | t2 = t1.with_columns(c=pw.this.a // pw.this.b)
101 division by zero | t2 = t1.with_columns(c=pw.this.a // pw.this.b)
102 """,
103 split_on_whitespace=False,
104 )
105 assert_table_equality_wo_index(
106 (t2, global_errors()),
107 (expected, expected_errors),
108 terminate_on_error=False,
109 )
110
111
112def test_filter_with_error_in_condition():

Callers

nothing calls this directly

Calls 3

TFunction · 0.90
global_errorsFunction · 0.85
with_columnsMethod · 0.80

Tested by

no test coverage detected