Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vdusek committed Aug 22, 2024
1 parent ea47b33 commit 4dd0a6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/unit/_autoscaling/test_snapshotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def test_memory_load_evaluation_logs_warning_on_high_usage(
snapshotter: Snapshotter,
) -> None:
mock_logger_warn = MagicMock()
monkeypatch.setattr(getLogger('crawlee.autoscaling.snapshotter'), 'warning', mock_logger_warn)
monkeypatch.setattr(getLogger('crawlee._autoscaling.snapshotter'), 'warning', mock_logger_warn)
snapshotter._max_memory_size = ByteSize.from_gb(8)

high_memory_usage = ByteSize.from_gb(8) * 0.9 # 90% of 8 GB
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/parsel_crawler/test_parsel_crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def test_import_error_handled() -> None:
with mock.patch.dict('sys.modules', {'parsel': None}):
# Invalidate ParselCrawler import
sys.modules.pop('crawlee.parsel_crawler', None)
sys.modules.pop('crawlee.parsel_crawler.parsel_crawler', None)
sys.modules.pop('crawlee.parsel_crawler._parsel_crawler', None)

with pytest.raises(ImportError) as import_error:
from crawlee.parsel_crawler import ParselCrawler # noqa: F401
Expand Down

0 comments on commit 4dd0a6b

Please sign in to comment.