python.tests: fix test that broke for unknown reason on python 2.7.12

char-rename
Björn Lindqvist 2016-11-21 04:59:03 +01:00
parent 9055ff5189
commit 40c277499d
1 changed files with 8 additions and 8 deletions

View File

@ -12,15 +12,15 @@ IN: python
] py-test ] py-test
! Pretty sure the # of None references should stay constant. ! Pretty sure the # of None references should stay constant.
: count-none-refs ( -- n )
[
"sys" py-import "getrefcount" getattr
<none> <1py-tuple> call-object py>
] with-destructors ;
{ t } [ { t } [
[ ! For some reason, the count increased by one the first time.
"sys" py-import "getrefcount" getattr count-none-refs drop
<none> <1py-tuple> call-object py> count-none-refs count-none-refs =
] with-destructors
[
"sys" py-import "getrefcount" getattr
<none> <1py-tuple> call-object py>
] with-destructors =
] unit-test ] unit-test
{ } [ { f f f } >py drop ] py-test { } [ { f f f } >py drop ] py-test