[pypy-commit] pypy cpyext-gc-cycle: Added some weakref tests to dot tests to cover important cases

stevie_92 pypy.commits at gmail.com
Sat Apr 20 08:47:11 EDT 2019


Author: Stefan Beyer <home at sbeyer.at>
Branch: cpyext-gc-cycle
Changeset: r96526:e3d2ca7b1fe6
Date: 2019-04-20 14:46 +0200
http://bitbucket.org/pypy/pypy/changeset/e3d2ca7b1fe6/

Log:	Added some weakref tests to dot tests to cover important cases

diff --git a/rpython/memory/gc/test/dot/free_cpython_weakref_simple.dot b/rpython/memory/gc/test/dot/free_cpython_weakref_simple_1.dot
rename from rpython/memory/gc/test/dot/free_cpython_weakref_simple.dot
rename to rpython/memory/gc/test/dot/free_cpython_weakref_simple_1.dot
diff --git a/rpython/memory/gc/test/dot/free_cpython_weakref_simple.dot b/rpython/memory/gc/test/dot/free_cpython_weakref_simple_2.dot
copy from rpython/memory/gc/test/dot/free_cpython_weakref_simple.dot
copy to rpython/memory/gc/test/dot/free_cpython_weakref_simple_2.dot
--- a/rpython/memory/gc/test/dot/free_cpython_weakref_simple.dot
+++ b/rpython/memory/gc/test/dot/free_cpython_weakref_simple_2.dot
@@ -1,7 +1,8 @@
 digraph G {
     "a" [type=C, alive=n];
     "b" [type=C, alive=n];
+    "c" [type=C, alive=y, ext_refcnt=1];
     "a" -> "b";
     "b" -> "a";
-    "a" -> "b" [weakref=y, callback=y, clear_callback=y];
+    "a" -> "c" [weakref=y, callback=y, clear_callback=y];
 }
diff --git a/rpython/memory/gc/test/dot/free_cpython_weakref_simple.dot b/rpython/memory/gc/test/dot/free_cpython_weakref_simple_3.dot
copy from rpython/memory/gc/test/dot/free_cpython_weakref_simple.dot
copy to rpython/memory/gc/test/dot/free_cpython_weakref_simple_3.dot
--- a/rpython/memory/gc/test/dot/free_cpython_weakref_simple.dot
+++ b/rpython/memory/gc/test/dot/free_cpython_weakref_simple_3.dot
@@ -1,7 +1,8 @@
 digraph G {
     "a" [type=C, alive=n];
     "b" [type=C, alive=n];
+    "c" [type=C, alive=y, ext_refcnt=1];
     "a" -> "b";
     "b" -> "a";
-    "a" -> "b" [weakref=y, callback=y, clear_callback=y];
+    "c" -> "a" [weakref=y, callback=y, clear_callback=n];
 }


More information about the pypy-commit mailing list