Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
9866a0f9
Commit
9866a0f9
authored
Jul 26, 2017
by
Jason Rhinelander
Browse files
test_class: use gc_collect instead of detail_reg_inst side-effect
parent
b468a3ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
tests/test_class.py
tests/test_class.py
+5
-5
No files found.
tests/test_class.py
View file @
9866a0f9
...
@@ -159,11 +159,11 @@ def test_operator_new_delete(capture):
...
@@ -159,11 +159,11 @@ def test_operator_new_delete(capture):
with
capture
:
with
capture
:
del
a
del
a
ConstructorStats
.
detail_reg_ins
t
()
pytest
.
gc_collec
t
()
del
b
del
b
ConstructorStats
.
detail_reg_ins
t
()
pytest
.
gc_collec
t
()
del
d
del
d
ConstructorStats
.
detail_reg_ins
t
()
pytest
.
gc_collec
t
()
assert
capture
==
"""
assert
capture
==
"""
A delete
A delete
B delete 4
B delete 4
...
@@ -172,9 +172,9 @@ def test_operator_new_delete(capture):
...
@@ -172,9 +172,9 @@ def test_operator_new_delete(capture):
with
capture
:
with
capture
:
del
c
del
c
ConstructorStats
.
detail_reg_ins
t
()
pytest
.
gc_collec
t
()
del
c2
del
c2
ConstructorStats
.
detail_reg_ins
t
()
pytest
.
gc_collec
t
()
assert
capture
==
(
assert
capture
==
(
"C delete "
+
sz_noalias
+
"
\n
"
+
"C delete "
+
sz_noalias
+
"
\n
"
+
"C delete "
+
sz_alias
+
"
\n
"
"C delete "
+
sz_alias
+
"
\n
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment