summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2019-10-25 22:41:26 -0400
committerDan Halbert <halbert@halwitz.org>2019-10-25 22:41:26 -0400
commit76817eaa105f81896c9c51ca5735bdec8e3424b4 (patch)
tree6dfcfe8b2b61a989c01d351b3d9122a9d814d2da /tests
parentaa1eed3bd3911bb4504feda9d1d28bcd0928137d (diff)
parent3683ee3ffa5b6da2574e1618b539b68cbc7e8db5 (diff)
Merge remote-tracking branch 'adafruit/master' into nano-33-ble
Diffstat (limited to 'tests')
-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))