Skip to content

Commit fe3375e

Browse files
bug: workaround for windows
1 parent cb669f1 commit fe3375e

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/equation_tree/tree.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,8 +1248,6 @@ def simplify(
12481248
>>> equation_tree.sympy_expr
12491249
(-c_1 + x_1)*(c_1 - x_1)
12501250
1251-
# it is good practice to define tests at the begining of a script and use them
1252-
# throughout the project
12531251
>>> equation_tree.simplify(
12541252
... operator_test=is_operator,
12551253
... function_test=is_function
@@ -1283,18 +1281,18 @@ def operator_test(x):
12831281
def operator_test(x):
12841282
return tmp_o(x) or x in self.operators
12851283

1286-
class TimeoutError(Exception):
1287-
pass
1284+
# class TimeoutError(Exception):
1285+
# pass
12881286

1289-
def timeout_handler(signum, frame):
1290-
raise TimeoutError("Function call timed out")
1287+
# def timeout_handler(signum, frame):
1288+
# raise TimeoutError("Function call timed out")
12911289

1292-
signal.signal(signal.SIGALRM, timeout_handler)
1293-
signal.alarm(SIMPLIFY_TIMEOUT)
1290+
# signal.signal(signal.SIGALRM, timeout_handler)
1291+
# signal.alarm(SIMPLIFY_TIMEOUT)
12941292
try:
12951293
simplified_equation = simplify(self.sympy_expr)
1296-
signal.alarm(0)
1297-
except TimeoutError:
1294+
# signal.alarm(0)
1295+
except:
12981296
simplified_equation = self.sympy_expr
12991297
if not check_functions(simplified_equation, function_test):
13001298
warnings.warn(

0 commit comments

Comments
 (0)