Skip to content

Commit

Permalink
Using ExitStack
Browse files Browse the repository at this point in the history
  • Loading branch information
euri10 committed Jul 23, 2019
1 parent c341a77 commit 3fd7fba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_connection_options.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Unit tests for the backend connection arguments.
"""
from contextlib import suppress
from contextlib import ExitStack as does_not_raise
from urllib.parse import urlparse

import pytest
Expand Down Expand Up @@ -39,7 +39,7 @@ def test_postgres_explicit_ssl():


urls_with_options = [
(f"{POSTGRES_URLS[0]}?min_size=1&max_size=20", suppress()),
(f"{POSTGRES_URLS[0]}?min_size=1&max_size=20", does_not_raise()),
(f"{POSTGRES_URLS[0]}?min_size=0&max_size=0", pytest.raises(ValueError)),
(f"{POSTGRES_URLS[0]}?min_size=10&max_size=0", pytest.raises(ValueError)),
]
Expand Down

0 comments on commit 3fd7fba

Please sign in to comment.