Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHutchison committed Dec 1, 2023
1 parent 6a0bc6b commit 1a41c12
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pytest_hot_reloading/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,16 +253,21 @@ def _manage_prior_session_garbage(session: pytest.Session) -> None:
prior_session.__dict__ = session.__dict__


# performance improvements
# when doing a best_effort_copy, do not copy these attributes
no_copy = {
"_arg2fixturedefs",
"_fixtureinfo",
"keywords",
"_fixturemanager",
"_pyfuncitem",
# '_request'
}

use_best_effort_copy = {"_request"}
# when doing a best_effort_copy, do not deep copy this
# instead, force a best effort up to a given depth
use_best_effort_copy = {
"_request",
}


def _pytest_main(config: pytest.Config, session: pytest.Session):
Expand Down

0 comments on commit 1a41c12

Please sign in to comment.