Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/pre-commit/pre-commit
/ _test
Function
_test
tests/envcontext_test.py:13–17 ·
view source on GitHub ↗
(*, before, patch, expected)
Source
from the content-addressed store, hash-verified
11
12
13
def
_test(*, before, patch, expected):
14
env = before.copy()
15
with
envcontext(patch, _env=env):
16
assert env == expected
17
assert env == before
18
19
20
def
test_trivial():
Callers
10
test_trivial
Function · 0.85
test_noop
Function · 0.85
test_adds
Function · 0.85
test_overrides
Function · 0.85
test_unset_but_nothing_to_unset
Function · 0.85
test_unset_things_to_remove
Function · 0.85
test_templated_environment_variable_missing
Function · 0.85
test_templated_environment_variable_defaults
Function · 0.85
test_templated_environment_variable_there
Function · 0.85
test_templated_environ_sources_from_previous
Function · 0.85
Calls
1
envcontext
Function · 0.90
Tested by
no test coverage detected