This repository was archived by the owner on Apr 14, 2025. It is now read-only.
Tags: Avvir/pyne
Tags
to_raise_error_with_message: Compare to actual exception message
Example code:
```
def f():
raise e
expect(f).to_raise_error_with_message(msg)
```
Previous behavior: Asserts that `e.args[0] == msg`
New behavior: Asserts that `str(e) == msg`
In some cases this behavior is equivalent, but not all.
Resolves: #8
Add MegaStub to replace unintuitive group_stubs `group_stubs` was previously added to manage a collection of stubs as a group. It gives the impression that it can be used to manage the stubs as a group, but in practice it only: 1) Applies all stubs on creation 2) Will remove all stubs on exit of a with statement Instead of fixing this behavior, and breaking tests that rely on it, it is "deprecated", and a new `mega_stub` method creates an object that manages the collection of stubs. 1) Doesn't change the state of the stubs on creation 2) Has `stub` and `unstub` methods that applies to the group 3) Has with-statement support that applies to the group Stub / Unstab functions were added to Spy so that it can be used as part of a `MegaStub` `group_stubs` is marked as deprecated and yields a warning
PreviousNext