diff options
author | Peter Korsgaard <peter@korsgaard.com> | 2018-12-02 08:15:26 +0100 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2018-12-02 08:16:10 +0100 |
commit | 13c43455a05b036002e79808ca1c8e0d91d7871b (patch) | |
tree | 147ddbfc5486085018bb527de1a43961fc8ee1ca /support/testing/tests/package/sample_python_attrs.py | |
parent | 2e08c7398a47b414c288ea516514adac3edf00fb (diff) | |
parent | 0393f5d34433e34e49ff7ce0fb998735453ed4fc (diff) | |
download | buildroot-13c43455a05b036002e79808ca1c8e0d91d7871b.tar.gz buildroot-13c43455a05b036002e79808ca1c8e0d91d7871b.zip |
Merge branch 'next'
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'support/testing/tests/package/sample_python_attrs.py')
-rw-r--r-- | support/testing/tests/package/sample_python_attrs.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/support/testing/tests/package/sample_python_attrs.py b/support/testing/tests/package/sample_python_attrs.py new file mode 100644 index 0000000000..f224944914 --- /dev/null +++ b/support/testing/tests/package/sample_python_attrs.py @@ -0,0 +1,15 @@ +import attr + + +@attr.s +class Obj(object): + x = attr.ib() + y = attr.ib(default=1) + + +obj1 = Obj(2) +assert(obj1.x == 2) +assert(obj1.y == 1) +obj2 = Obj(3, 4) +assert(obj2.x == 3) +assert(obj2.y == 4) |