summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics')
-rw-r--r--tests/basics/class_store_class.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/basics/class_store_class.py b/tests/basics/class_store_class.py
index cc80fb5b1c..60f65220d9 100644
--- a/tests/basics/class_store_class.py
+++ b/tests/basics/class_store_class.py
@@ -2,7 +2,10 @@
# There was a bug in MicroPython that under some conditions class stored
# in instance attribute later was returned "bound" as if it was a method,
# which caused class constructor to receive extra argument.
-from _collections import namedtuple
+try:
+ from collections import namedtuple
+except ImportError:
+ from _collections import namedtuple
_DefragResultBase = namedtuple('DefragResult', 'foo bar')