examples/usercmodule: Add finaliser unit tests.

Signed-off-by: Andrew Leech <andrew@alelec.net>
pull/13011/head
Andrew Leech 2024-04-04 02:52:17 +11:00
rodzic c846071998
commit d0528fe571
4 zmienionych plików z 36 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,13 @@
# test custom native class
try:
import cexample
import gc
except ImportError:
print("SKIP")
raise SystemExit
timer = cexample.Timer()
timer = None
gc.collect()
print("done")

Wyświetl plik

@ -0,0 +1,2 @@
de-init cexample resources
done

Wyświetl plik

@ -0,0 +1,19 @@
# test custom native class
try:
import cexample
import time
import gc
except ImportError:
print("SKIP")
raise SystemExit
a = 100
b = 20
timer = cexample.Timer()
c = 4
d = 5
timer = None
gc.collect()
print("done")

Wyświetl plik

@ -0,0 +1,2 @@
de-init cexample resources
done