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

fix tests RuntimeWarning #1398

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

clavedeluna
Copy link
Contributor

When running tests, the following warnings appeared

test/test_router.py::TestRouter::testFloatFilter
test/test_router.py::TestRouterInCGIMode::testFloatFilter
  /Users/dani/bottle/bottle.py:419: RuntimeWarning: Route <GET /object/<id:float>> overwrites a previously defined route
    warnings.warn(msg % (method, rule), RuntimeWarning)

test/test_router.py::TestRouter::testParentheses
test/test_router.py::TestRouterInCGIMode::testParentheses
  /Users/dani/bottle/bottle.py:419: RuntimeWarning: Route <GET /func2(:param#(foo|bar)#)> overwrites a previously defined route
    warnings.warn(msg % (method, rule), RuntimeWarning)

These seem to me to be purely an artifact of the way the tests were written, so I updated the route name for the tests. This removes the warning and (I believe) keep the test integrity.

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

1 participant