mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-20 06:49:25 +00:00
Simplify tests by replacing output capture with asserts where possible
The C++ part of the test code is modified to achieve this. As a result,
this kind of test:
```python
with capture:
kw_func1(5, y=10)
assert capture == "kw_func(x=5, y=10)"
```
can be replaced with a simple:
`assert kw_func1(5, y=10) == "x=5, y=10"`
This commit is contained in:
@@ -173,7 +173,7 @@ def test_inheriting_repeat(capture):
|
||||
assert obj.lucky_number() == -4.25
|
||||
|
||||
|
||||
def test_move_support(capture, msg):
|
||||
def test_move_support(capture):
|
||||
from pybind11_tests import NCVirt, NonCopyable, Movable
|
||||
|
||||
class NCVirtExt(NCVirt):
|
||||
|
||||
Reference in New Issue
Block a user