summaryrefslogtreecommitdiff
path: root/tests/basics/class_bytes.py
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2019-10-15 15:55:21 -0400
committerDan Halbert <halbert@halwitz.org>2019-10-15 15:55:21 -0400
commitbe8136dc6d09e2c3af5c20c881662ebf51a778d8 (patch)
treed365470b40d1877449c929dce43c55a288550437 /tests/basics/class_bytes.py
parentfc19e03128aeeb94a22fdff097e4d0576d768986 (diff)
parent63790f01f833ff197d92f80816f21a61e924bd72 (diff)
Merge remote-tracking branch 'adafruit/master' into bonding1
Diffstat (limited to 'tests/basics/class_bytes.py')
-rw-r--r--tests/basics/class_bytes.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/basics/class_bytes.py b/tests/basics/class_bytes.py
new file mode 100644
index 000000000..75e2e7244
--- /dev/null
+++ b/tests/basics/class_bytes.py
@@ -0,0 +1,9 @@
+class C1:
+ def __init__(self, value):
+ self.value = value
+
+ def __bytes__(self):
+ return self.value
+
+c1 = C1(b"class 1")
+print(bytes(c1))