diff options
Diffstat (limited to 'tests/micropython/memstats.py')
-rw-r--r-- | tests/micropython/memstats.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/micropython/memstats.py b/tests/micropython/memstats.py index 33204d908..0e2e7b1c0 100644 --- a/tests/micropython/memstats.py +++ b/tests/micropython/memstats.py @@ -1,9 +1,10 @@ # tests meminfo functions in micropython module -import micropython +try: + import micropython -# these functions are not always available -if not hasattr(micropython, "mem_total"): + micropython.mem_total +except (ImportError, AttributeError): print("SKIP") raise SystemExit |