<commit_before>USING: accessors alien arrays assocs calendar continuations destructors
destructors.private fry kernel math memory namespaces python python.errors
python.ffi python.objects sequences strings tools.test ;
IN: python

: py-test ( result quot -- )
    '[ python-dll-loaded? [ _ [ _ with-destructors ] unit-test ] when ] call ; inline

! None testing
{ t } [
    "builtins" "None" py-import-from <none> =
] py-test

! Pretty sure the # of None references should stay constant.
: count-none-refs ( -- n )
    "sys" "getrefcount" py-import-from
    <none> <1py-tuple> call-object py> ;

{ t } [ count-none-refs count-none-refs = ] py-test

{ } [ { f f f } >py drop ] py-test

! Destructors
{ 1 } [ 33 >py drop always-destructors get length ] py-test
<commit_msg>python: remove heisentest<commit_after>USING: accessors alien arrays assocs calendar continuations destructors
destructors.private fry kernel math memory namespaces python python.errors
python.ffi python.objects sequences strings tools.test ;
IN: python

: py-test ( result quot -- )
    '[ python-dll-loaded? [ _ [ _ with-destructors ] unit-test ] when ] call ; inline

! None testing
{ t } [
    "builtins" "None" py-import-from <none> =
] py-test

! Destructors
{ 1 } [ 33 >py drop always-destructors get length ] py-test

{'fraction_non_alphanumeric': 0.11496913580246913, 'fraction_numerical': 0.005401234567901234, 'mean_word_length': 3.6487455197132617, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '949907', 'n_tokens_mistral': 427, 'n_tokens_neox': 407, 'n_words': 128}