Dingus

Latest version: v0.3.4

Safety actively analyzes 619504 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.3.4

- Correctly isolate submodule objects like os.path.isdir (thanks, CJ Gaconnet)

0.3.3

- Add isolate method (the opposite of patch: it patches everything in the
object path's module except the object itself. See the README.

- Allow dinguses to be used as context managers in Python 2.7 (thanks, Chris
Wesseling and Christian Wyglendowski).

0.3.2

- Make dinguses copyable with copy.deepcopy (this will return a new dingus
identical, but separate from, the old)

0.3.1

- Fix simple README bug

0.3

- Remove automocking of magic __methods__ in DingusTestCase (thanks, Dave
Stanek).

- Make attributes "del"able.

- Add patch decorator/context manager.

0.2

- Dinguses now yield exactly one item when iterated over. Previously, they
always iterated infinitely.

- Added a helper function to specify return values when creating dinguses:
Dingus(foo=returner(5)) will make the dingus' foo method return 5. All
returner() does is create a dingus with the specified return_value.

- Renamed the "one" method to "once". "one" still exists but is deprecated.

- Improved examples.

- Added ability to exclude objects when isolating with DingusTestCase. Give
DingusTestCase an "exclude" keyword argument that lists the names of the
objects that should be left alone (see examples/isolation).

- Fixed an exception when using tuples as keys in a dingus. (Thanks, Christian
Wyglendowski)

- Added support for pickling dinguses (Thanks, Tanel Külaots)

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.