Skip to content

Commit 3df8fc4

Browse files
committed
Update CHANGES
1 parent bb9d5b3 commit 3df8fc4

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

CHANGES.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,24 @@ Release 2.0.0
8686
(e.g. `sys.stdout`, `sys.argv`, and environment/config dictionaries) with
8787
context-manager support and restoration through `unstub`.
8888

89+
E.g.::
90+
91+
patch_attr("sys.argv", ["foo", "bar"])
92+
with patch_attr("sys.stdout", StringIO()) as stdout: ...
93+
with patch_dict(os.environ, {"user": "bob"}): ...
94+
95+
- Added explicit partial-`unstub` targeting by host + attribute name.
96+
This complements method-reference partial unstub (e.g. `unstub(cat.meow)`)
97+
and supports tuple form and shorthand form, including multiple attributes
98+
in one call.
99+
100+
E.g.::
101+
102+
unstub(cat.meow)
103+
unstub((cat, "meow"))
104+
unstub(cat, "meow")
105+
unstub((cat, "meow"), (os.path, "exists"))
106+
89107

90108

91109

0 commit comments

Comments
 (0)