Skip to content

Commit

Permalink
refactor: rm debug lines
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Dec 9, 2024
1 parent 73fa1f8 commit 8733536
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
19 changes: 0 additions & 19 deletions src/ape/pytest/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import pytest
from eth_utils import to_hex
from rich import print as rich_print

from ape.exceptions import BlockNotFoundError, ChainError, ProviderNotConnectedError
from ape.logging import logger
Expand Down Expand Up @@ -196,9 +195,6 @@ def rebase(self, scope: Scope, fixtures: "FixtureMap"):
if rebase.return_scope is not None:
log = f"{log} scope={rebase.return_scope}"

log = f"{log} invalidated-fixtures='{', '.join(invalidated)}'"
self.isolation_manager._records.append(log)

def _get_rebase(self, scope: Scope) -> Optional[FixtureRebase]:
# Check for fixtures that are now invalid. For example, imagine a session
# fixture comes into play after the module snapshot has been set.
Expand Down Expand Up @@ -557,7 +553,6 @@ def __init__(
):
self.config_wrapper = config_wrapper
self.receipt_capture = receipt_capture
self._records: list[str] = []
self._chain_snapshots = chain_snapshots

@cached_property
Expand Down Expand Up @@ -613,9 +608,6 @@ def set_snapshot(self, scope: Scope):
if not self.supported:
return

if self.config_wrapper.verbosity:
self._records.append(f"snapshot-taken '{scope.name.upper()}'")

try:
snapshot_id = self.take_snapshot()
except Exception:
Expand Down Expand Up @@ -649,9 +641,6 @@ def restore(self, scope: Scope):
self.snapshots.clear_snapshot_id(scope)
return

if self.config_wrapper.verbosity:
self._records.append(f"restoring '{scope.name.upper()}'")

try:
self._restore(snapshot_id)
except NotImplementedError:
Expand All @@ -667,14 +656,6 @@ def restore(self, scope: Scope):
def _restore(self, snapshot_id: "SnapshotID"):
self.chain_manager.restore(snapshot_id)

def show_records(self):
if not self._records:
return

records_str = "\n".join(self._records)
rich_print(f"\n{records_str}")
self._records = []


class ReceiptCapture(ManagerAccessMixin):
receipt_map: dict[str, dict[str, "ReceiptAPI"]] = {}
Expand Down
6 changes: 0 additions & 6 deletions src/ape/pytest/runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
from ape.utils.basemodel import ManagerAccessMixin

if TYPE_CHECKING:
from _pytest.reports import TestReport

from ape.api.networks import ProviderContextManager
from ape.pytest.config import ConfigWrapper
from ape.pytest.coverage import CoverageTracker
Expand Down Expand Up @@ -310,10 +308,6 @@ def _connect(self):
self._provider_context.push_provider()
self._provider_is_connected = True

def pytest_runtest_logreport(self, report: "TestReport"):
if self.config_wrapper.verbosity >= 3:
self.isolation_manager.show_records()

def pytest_terminal_summary(self, terminalreporter):
"""
Add a section to terminal summary reporting.
Expand Down

0 comments on commit 8733536

Please sign in to comment.