We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb9d5b3 commit 3df8fc4Copy full SHA for 3df8fc4
1 file changed
CHANGES.txt
@@ -86,6 +86,24 @@ Release 2.0.0
86
(e.g. `sys.stdout`, `sys.argv`, and environment/config dictionaries) with
87
context-manager support and restoration through `unstub`.
88
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
101
102
+ unstub(cat.meow)
103
+ unstub((cat, "meow"))
104
+ unstub(cat, "meow")
105
+ unstub((cat, "meow"), (os.path, "exists"))
106
107
108
109
0 commit comments