Aunsiels / pyformlang

A python library to manipulate formal languages and various automata
https://pypi.org/project/pyformlang/
MIT License
45 stars 10 forks source link

Bug in test_python_regex #24

Closed bygu4 closed 1 month ago

bygu4 commented 1 month ago

For some reason, test_backslash is defined twice in the TestPythonRegex class, and because of that, framework runs only one of the declarations. Merging these tests into one, or renaming one of them, fails the test run.

To see that you can rename this function, which causes the test run to fail: https://github.com/Aunsiels/pyformlang/blob/4f36e28492a529d67129dcecaf9d07ca69fb0cf6/pyformlang/regular_expression/tests/test_python_regex.py#L204-L208

Looks like the issue is not with the test itself, because it only compares the behavior of pyformlang's PythonRegex with the behavior of re module.

Enviroment

Aunsiels commented 1 month ago

Thank you for your issue. I fixed the problem.