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
8 changes: 8 additions & 0 deletions tests/constructor_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,16 @@ void print_created(T *inst, Values &&...values) {
}
template <class T, typename... Values>
void print_destroyed(T *inst, Values &&...values) { // Prints but doesn't store given values
/*
* On GraalPy, destructors can trigger anywhere and this can cause random
* failures in unrelated tests.
*/
#if !defined(GRAALVM_PYTHON)
print_constr_details(inst, "destroyed", values...);
track_destroyed(inst);
#else
py::detail::silence_unused_warnings(inst, values...);
#endif
}
template <class T, typename... Values>
void print_values(T *inst, Values &&...values) {
Expand Down
6 changes: 0 additions & 6 deletions tests/test_iostream.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,8 @@

import pytest

import env # noqa: F401
from pybind11_tests import iostream as m

pytestmark = pytest.mark.skipif(
"env.GRAALPY",
reason="Delayed prints from finalizers from other tests can end up in the output",
)


def test_captured(capsys):
msg = "I've been redirected to Python, I hope!"
Expand Down