MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_context_classmethod

Function test_context_classmethod

testing/test_monkeypatch.py:413–420  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

411
412
413def test_context_classmethod() -> None:
414 class A:
415 x = 1
416
417 with MonkeyPatch.context() as m:
418 m.setattr(A, "x", 2)
419 assert A.x == 2
420 assert A.x == 1
421
422
423def test_syspath_prepend_with_namespace_packages(

Callers

nothing calls this directly

Calls 2

contextMethod · 0.80
setattrMethod · 0.80

Tested by

no test coverage detected