Prevent error on exit if some code messes with sys.meta_path and removes the
assertionrewrite hook (CaptureMock seems to do this):
File "/Users/marca/dev/hg-repos/pytest/_pytest/assertion/__init__.py", line 64, in pytest_unconfigure
sys.meta_path.remove(hook)
ValueError: list.remove(x): x not in list
--HG--
branch : sys_meta_path_remove_hook_only_if_present
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| newinterpret.py | ||
| oldinterpret.py | ||
| reinterpret.py | ||
| rewrite.py | ||
| util.py | ||