diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-05-11 03:45:42 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-05-11 03:45:42 +0300 |
commit | ce6c10172be6d17f76779ece930908f6248a1706 (patch) | |
tree | ccf0aa0a1f6fc046893ab8659a3ec6c259d09b55 | |
parent | b4acd028b613a721ffbe5a3136700f190635f7c9 (diff) | |
download | micropython-ce6c10172be6d17f76779ece930908f6248a1706.tar.gz micropython-ce6c10172be6d17f76779ece930908f6248a1706.zip |
tests: Really fix import.
-rw-r--r-- | tests/basics/class_store_class.py | 5 |
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') |