Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fixed pytest warning #37

Merged
merged 1 commit into from
Jan 9, 2021
Merged

Conversation

j8xixo12
Copy link
Contributor

@j8xixo12 j8xixo12 commented Jan 9, 2021

#28 caused by way which treated raw string literal is different between python2 and python3 interpreter
more detail can check PEP-414
Therefore \( \)....\[, \] such like these string in Regex pattern will be treated as invalid escape sequence,
I figure out two way to fix this issue,

  1. replace \( by \\(
  2. add prefix r into Regex pattern explicitly marked with the raw Unicode
    and I choose 2

@yungyuc
Copy link
Owner

yungyuc commented Jan 9, 2021

I think you chose the second approach. Have you tested with a brand new build/run?

@j8xixo12
Copy link
Contributor Author

j8xixo12 commented Jan 9, 2021

I think you chose the second approach. Have you tested with a brand new build/run?

i tested in my own repo, here is the log

platform linux -- Python 3.7.5, pytest-6.2.1, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /home/runner/work/turgon/turgon/spacetime
collecting ... collected 61 items

tests/test_celm_selm.py::CelmTC::test_bounding_se PASSED
tests/test_celm_selm.py::CelmTC::test_calc_so PASSED
tests/test_celm_selm.py::CelmTC::test_coordinates PASSED
.
.
.
tests/test_solution.py::PythonCustomSolverTC::test_se PASSED
tests/test_solution.py::PythonCustomSolverTC::test_xctr PASSED
tests/test_solution.py::SolverProxyTC::test_march PASSED
tests/test_solution.py::SolverProxyTC::test_march_fine_interface PASSED

============================== 61 passed in 6.04s ==============================

@yungyuc
Copy link
Owner

yungyuc commented Jan 9, 2021

It seems that you totally resolved the unwanted warnings. I'd like to merge now.

@yungyuc yungyuc merged commit f064376 into yungyuc:master Jan 9, 2021
@yungyuc yungyuc mentioned this pull request Jan 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants