Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ extend-select = [
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"PERF", # Perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
Expand Down
4 changes: 2 additions & 2 deletions tests/test_class_sh_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ def test_pass_unique_ptr_disowns(pass_f, rtrn_f, expected):
pass_f(obj)
assert str(exc_info.value) == (
"Missing value for wrapped C++ type"
+ " `pybind11_tests::class_sh_basic::atyp`:"
+ " Python instance was disowned."
" `pybind11_tests::class_sh_basic::atyp`:"
" Python instance was disowned."
)


Expand Down
6 changes: 1 addition & 5 deletions tests/test_iostream.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,7 @@ def test_redirect_both(capfd):
def test_threading():
with m.ostream_redirect(stdout=True, stderr=False):
# start some threads
threads = []

# start some threads
for _j in range(20):
threads.append(m.TestThread())
threads = [m.TestThread() for _j in range(20)]

# give the threads some time to fail
threads[0].sleep()
Expand Down
6 changes: 3 additions & 3 deletions tests/test_stl_binders.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def test_noncopyable_containers():
assert nvnc[i][j].value == j + 1

# Note: maps do not have .values()
for _, v in nvnc.items():
for v in nvnc.values():
for i, j in enumerate(v, start=1):
assert j.value == i

Expand All @@ -269,7 +269,7 @@ def test_noncopyable_containers():
assert nmnc[i][j].value == 10 * j

vsum = 0
for _, v_o in nmnc.items():
for v_o in nmnc.values():
for k_i, v_i in v_o.items():
assert v_i.value == 10 * k_i
vsum += v_i.value
Expand All @@ -283,7 +283,7 @@ def test_noncopyable_containers():
assert numnc[i][j].value == 10 * j

vsum = 0
for _, v_o in numnc.items():
for v_o in numnc.values():
for k_i, v_i in v_o.items():
assert v_i.value == 10 * k_i
vsum += v_i.value
Expand Down
Loading