Skip to content

Commit

Permalink
Cleanup leak in test_modules by using new non-extension-module constr…
Browse files Browse the repository at this point in the history
…uctor
  • Loading branch information
YannickJadoul committed Jan 30, 2021
1 parent 2436f44 commit 1d0660f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/test_modules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ TEST_SUBMODULE(modules, m) {
class Dupe3 { };
class DupeException { };

// Go ahead and leak, until we have a non-leaking py::module_ constructor
auto dm = py::module_::create_extension_module("dummy", nullptr, new py::module_::module_def);
auto dm = py::module_("dummy");
auto failures = py::list();

py::class_<Dupe1>(dm, "Dupe1");
Expand Down

0 comments on commit 1d0660f

Please sign in to comment.