kopia lustrzana https://github.com/micropython/micropython
examples/usercmodule: Add finaliser unit tests.
Signed-off-by: Andrew Leech <andrew@alelec.net>pull/13011/head
rodzic
c846071998
commit
d0528fe571
|
@ -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")
|
|
@ -0,0 +1,2 @@
|
||||||
|
de-init cexample resources
|
||||||
|
done
|
|
@ -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")
|
|
@ -0,0 +1,2 @@
|
||||||
|
de-init cexample resources
|
||||||
|
done
|
Ładowanie…
Reference in New Issue