diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-04-30 02:17:45 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-04-30 02:17:45 +0300 |
commit | c963310123765baddf638c8d08b8fdb2f73b6ba6 (patch) | |
tree | dfc2909c6c62f13bd8625f424acec5e96500eaff /tests/basics/subclass-native4.py | |
parent | 7f0419c0e528faf444c60dea461f172143dbc88d (diff) | |
download | micropython-c963310123765baddf638c8d08b8fdb2f73b6ba6.tar.gz micropython-c963310123765baddf638c8d08b8fdb2f73b6ba6.zip |
tests: Add test for calling inherited native method on subclass.
Diffstat (limited to 'tests/basics/subclass-native4.py')
-rw-r--r-- | tests/basics/subclass-native4.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/basics/subclass-native4.py b/tests/basics/subclass-native4.py new file mode 100644 index 0000000000..b426793f59 --- /dev/null +++ b/tests/basics/subclass-native4.py @@ -0,0 +1,9 @@ +# Test calling non-special method inherited from native type + +class mylist(list): + pass + +l = mylist([1, 2, 3]) +print(l) +l.append(10) +print(l) |