Skip to content
This repository has been archived by the owner on May 2, 2022. It is now read-only.

Fix Pytest4.x compatibility errors #3

Merged
merged 1 commit into from
Jun 1, 2019

Conversation

stanislavlevin
Copy link
Contributor

There are no longer named marker attributes:
pytest-dev/pytest#891

This results in not expecting param ssl and leads to errors like:

...
test/test_dugong.py::test_http_proxy[plain-None] PASSED                  [  4%]
test/test_dugong.py::test_http_proxy[plain-8080] PASSED                  [  5%]
test/test_dugong.py::test_connect_proxy[plain-None] PASSED               [  6%]
test/test_dugong.py::test_connect_proxy[plain-8080] PASSED               [  7%]
...
test/test_dugong.py::test_http_proxy[ssl-None] FAILED                    [ 51%]
test/test_dugong.py::test_http_proxy[ssl-8080] FAILED                    [ 52%]
test/test_dugong.py::test_connect_proxy[ssl-None] FAILED                 [ 53%]
test/test_dugong.py::test_connect_proxy[ssl-8080] FAILED                 [ 54%]
...

So, the marker `no_ssl` is just ignored.
Let's use the `get_closest_marker` method instead.

There are no longer named marker attributes:
pytest-dev/pytest#891

This results in not expecting param `ssl` and leads to errors like:
```
...
test/test_dugong.py::test_http_proxy[plain-None] PASSED                  [  4%]
test/test_dugong.py::test_http_proxy[plain-8080] PASSED                  [  5%]
test/test_dugong.py::test_connect_proxy[plain-None] PASSED               [  6%]
test/test_dugong.py::test_connect_proxy[plain-8080] PASSED               [  7%]
...
test/test_dugong.py::test_http_proxy[ssl-None] FAILED                    [ 51%]
test/test_dugong.py::test_http_proxy[ssl-8080] FAILED                    [ 52%]
test/test_dugong.py::test_connect_proxy[ssl-None] FAILED                 [ 53%]
test/test_dugong.py::test_connect_proxy[ssl-8080] FAILED                 [ 54%]
...

So, the marker `no_ssl` is just ignored.
Let's use the `get_closest_marker` method instead.

Signed-off-by: Stanislav Levin <[email protected]>
@Nikratio Nikratio merged commit 3b19ec3 into python-dugong:master Jun 1, 2019
@Nikratio
Copy link
Contributor

Nikratio commented Jun 1, 2019

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants