]> gitweb.factorcode.org Git - factor.git/commitdiff
python: fix tests
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 19 Jan 2022 23:20:32 +0000 (15:20 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 19 Jan 2022 23:20:32 +0000 (15:20 -0800)
extra/python/python-tests.factor
extra/python/syntax/syntax-tests.factor

index 5039450a4734f95875639178e2f09dec0ccac462..e967d9c8900697e4972ea2610071aa966a056fd8 100644 (file)
@@ -13,16 +13,10 @@ IN: python
 
 ! Pretty sure the # of None references should stay constant.
 : count-none-refs ( -- n )
-    [
-        "sys" "getrefcount" py-import-from
-        <none> <1py-tuple> call-object py>
-    ] with-destructors ;
+    "sys" "getrefcount" py-import-from
+    <none> <1py-tuple> call-object py> ;
 
-{ t } [
-    ! For some reason, the count increased by one the first time.
-    count-none-refs drop
-    count-none-refs count-none-refs =
-] py-test
+{ t } [ count-none-refs count-none-refs = ] py-test
 
 { } [ { f f f } >py drop ] py-test
 
index 49a80a88efbb08d5f383e0d7278a2541782d1f70..ac261e332d0efba9c739935e386730de987d22c3 100644 (file)
@@ -27,7 +27,7 @@ IN: python.syntax.tests
 ! Module variables are bound as zero-arg functions
 { t } [ $path py> s:sequence? ] py-test
 
-{ t } [ $path py> empty? not ] py-test
+{ t } [ $path py> s:empty? not ] py-test
 
 [ 10 ] [ 10 >py range len py> ] py-test