summaryrefslogtreecommitdiff
path: root/ext/pybind11/tests/test_keep_alive.py
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2017-05-09 19:22:53 +0100
committerAndreas Sandberg <andreas.sandberg@arm.com>2017-05-22 17:15:09 +0000
commit6914a229a038206341ae1fea46393965a555ca9a (patch)
tree4a11cfaed46dabc827c5ee17cd976f42b5f53d49 /ext/pybind11/tests/test_keep_alive.py
parentca1d18d599dcc620bf526fb22042af95b1b60b68 (diff)
downloadgem5-6914a229a038206341ae1fea46393965a555ca9a.tar.xz
ext: Upgrade PyBind11 to version 2.1.1
Change-Id: I16870dec402d661295f9d013dc23e362b2b2c169 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/3225 Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'ext/pybind11/tests/test_keep_alive.py')
-rw-r--r--ext/pybind11/tests/test_keep_alive.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/ext/pybind11/tests/test_keep_alive.py b/ext/pybind11/tests/test_keep_alive.py
index 0cef34658..bfd7d40c3 100644
--- a/ext/pybind11/tests/test_keep_alive.py
+++ b/ext/pybind11/tests/test_keep_alive.py
@@ -1,4 +1,4 @@
-import gc
+import pytest
def test_keep_alive_argument(capture):
@@ -9,14 +9,14 @@ def test_keep_alive_argument(capture):
assert capture == "Allocating parent."
with capture:
p.addChild(Child())
- gc.collect()
+ pytest.gc_collect()
assert capture == """
Allocating child.
Releasing child.
"""
with capture:
del p
- gc.collect()
+ pytest.gc_collect()
assert capture == "Releasing parent."
with capture:
@@ -24,11 +24,11 @@ def test_keep_alive_argument(capture):
assert capture == "Allocating parent."
with capture:
p.addChildKeepAlive(Child())
- gc.collect()
+ pytest.gc_collect()
assert capture == "Allocating child."
with capture:
del p
- gc.collect()
+ pytest.gc_collect()
assert capture == """
Releasing parent.
Releasing child.
@@ -43,14 +43,14 @@ def test_keep_alive_return_value(capture):
assert capture == "Allocating parent."
with capture:
p.returnChild()
- gc.collect()
+ pytest.gc_collect()
assert capture == """
Allocating child.
Releasing child.
"""
with capture:
del p
- gc.collect()
+ pytest.gc_collect()
assert capture == "Releasing parent."
with capture:
@@ -58,11 +58,11 @@ def test_keep_alive_return_value(capture):
assert capture == "Allocating parent."
with capture:
p.returnChildKeepAlive()
- gc.collect()
+ pytest.gc_collect()
assert capture == "Allocating child."
with capture:
del p
- gc.collect()
+ pytest.gc_collect()
assert capture == """
Releasing parent.
Releasing child.
@@ -77,11 +77,11 @@ def test_return_none(capture):
assert capture == "Allocating parent."
with capture:
p.returnNullChildKeepAliveChild()
- gc.collect()
+ pytest.gc_collect()
assert capture == ""
with capture:
del p
- gc.collect()
+ pytest.gc_collect()
assert capture == "Releasing parent."
with capture:
@@ -89,9 +89,9 @@ def test_return_none(capture):
assert capture == "Allocating parent."
with capture:
p.returnNullChildKeepAliveParent()
- gc.collect()
+ pytest.gc_collect()
assert capture == ""
with capture:
del p
- gc.collect()
+ pytest.gc_collect()
assert capture == "Releasing parent."