diff options
| author | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-07-03 15:05:08 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@chickadee.tech> | 2017-08-11 17:16:13 -0700 |
| commit | fab634e3eeb456e9d5dffa2cabb9ded39c45d6b6 (patch) | |
| tree | 4f1926142546130d7bd0388303ebe0cd2ab1181c /tests/basics/namedtuple1_cpython_compat.py | |
| parent | f6a702538a0b3dd72879d65e3acc32520d4371f5 (diff) | |
Turn on Rosie CI testing to test new builds on real hardware.
This introduces a skip_if module that can be used by tests to
determine when they should be skipped due to the environment.
Some tests have been split in order to have finer grained skip
control.
Diffstat (limited to 'tests/basics/namedtuple1_cpython_compat.py')
| -rw-r--r-- | tests/basics/namedtuple1_cpython_compat.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/basics/namedtuple1_cpython_compat.py b/tests/basics/namedtuple1_cpython_compat.py new file mode 100644 index 000000000..a1b852d90 --- /dev/null +++ b/tests/basics/namedtuple1_cpython_compat.py @@ -0,0 +1,20 @@ +import skip_if +skip_if.no_cpython_compat() + +try: + try: + from collections import namedtuple + except ImportError: + from ucollections import namedtuple +except ImportError: + skip_if.skip() + +# Try single string +T3 = namedtuple("TupComma", "foo bar") +t = T3(1, 2) +print(t.foo, t.bar) + +# Try single string with comma field separator +# Not implemented so far +#T2 = namedtuple("TupComma", "foo,bar") +#t = T2(1, 2) |
