Skip to content

Commit

Permalink
unpin pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
toluaina committed Oct 19, 2022
1 parent 4193452 commit fd6e4bd
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 21 deletions.
3 changes: 1 addition & 2 deletions requirements/dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
coverage
pip-tools
pre-commit
setuptools
guppy3
setuptools
9 changes: 3 additions & 6 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ freezegun==1.2.2
# via -r requirements/test.in
greenlet==1.1.3.post0
# via sqlalchemy
guppy3==3.1.2
# via -r requirements/dev.in
identify==2.5.6
# via pre-commit
idna==3.4
Expand Down Expand Up @@ -136,7 +134,7 @@ pyflakes==2.5.0
# via flake8
pyparsing==3.0.9
# via packaging
pytest==6.2.5
pytest==7.1.3
# via
# -r requirements/test.in
# pytest-cov
Expand Down Expand Up @@ -182,14 +180,13 @@ sqlparse==0.4.3
termcolor==2.0.1
# via pytest-sugar
toml==0.10.2
# via
# pre-commit
# pytest
# via pre-commit
tomli==2.0.1
# via
# black
# build
# coverage
# pytest
typing-extensions==4.4.0
# via black
urllib3==1.26.12
Expand Down
5 changes: 1 addition & 4 deletions requirements/test.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,4 @@ pytest-runner
pytest-mock
pytest-sugar
pytest-runner
freezegun

# pin to last know stable pytest
pytest==6.2.5
freezegun
5 changes: 2 additions & 3 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pyflakes==2.5.0
# via flake8
pyparsing==3.0.9
# via packaging
pytest==6.2.5
pytest==7.1.3
# via
# -r requirements/test.in
# pytest-cov
Expand Down Expand Up @@ -153,12 +153,11 @@ sqlparse==0.4.3
# via -r requirements/base.in
termcolor==2.0.1
# via pytest-sugar
toml==0.10.2
# via pytest
tomli==2.0.1
# via
# black
# coverage
# pytest
typing-extensions==4.4.0
# via black
urllib3==1.26.12
Expand Down
3 changes: 0 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Generic fixtures for PGSync tests."""
import logging
import os
import warnings

import pytest
import sqlalchemy as sa
Expand All @@ -14,8 +13,6 @@
from pgsync.sync import Sync
from pgsync.urls import get_postgres_url

warnings.filterwarnings("error")

logging.getLogger("faker").setLevel(logging.ERROR)


Expand Down
6 changes: 3 additions & 3 deletions tests/test_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sqlalchemy as sa
from mock import ANY, call, patch

from pgsync.helper import teardown
from pgsync import helper


@pytest.mark.usefixtures("table_creator")
Expand All @@ -17,7 +17,7 @@ def test_teardown_with_drop_db(self, mock_sync, mock_config, mock_logger):
mock_config.return_value = "tests/fixtures/schema.json"
mock_sync.truncate_schemas.return_value = None
with patch("pgsync.helper.drop_database") as mock_db:
teardown(drop_db=True, config="fixtures/schema.json")
helper.teardown(drop_db=True, config="fixtures/schema.json")
assert mock_db.call_args_list == [
call(ANY),
call(ANY),
Expand All @@ -32,7 +32,7 @@ def test_teardown_without_drop_db(self, mock_config, mock_logger, mock_es):
mock_config.return_value = "tests/fixtures/schema.json"
with patch("pgsync.sync.Sync") as mock_sync:
mock_sync.truncate_schemas.side_effect = sa.exc.OperationalError
teardown(drop_db=False, config="fixtures/schema.json")
helper.teardown(drop_db=False, config="fixtures/schema.json")
assert mock_logger.warning.call_args_list == [
call(ANY),
call(ANY),
Expand Down

0 comments on commit fd6e4bd

Please sign in to comment.