Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce6c101

Browse files
committed
tests: Really fix import.
1 parent b4acd02 commit ce6c101

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/basics/class_store_class.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
# There was a bug in MicroPython that under some conditions class stored
33
# in instance attribute later was returned "bound" as if it was a method,
44
# which caused class constructor to receive extra argument.
5-
from _collections import namedtuple
5+
try:
6+
from collections import namedtuple
7+
except ImportError:
8+
from _collections import namedtuple
69

710
_DefragResultBase = namedtuple('DefragResult', 'foo bar')
811

0 commit comments

Comments
 (0)