summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2019-10-15 09:03:24 -0400
committerDan Halbert <halbert@halwitz.org>2019-10-15 09:03:24 -0400
commiteca73436c9901d54384bd8aa445b0dd70dfae52a (patch)
treedc20675e7540a4cda6c76c10f5f125b1e72f8b1b /tests
parentfdd7ebef2dc89b606aca52ac4cec4dd722a94288 (diff)
parent9de155a1325bdba9873bfaa106c0638b296636b0 (diff)
Merge remote-tracking branch 'adafruit/master' into cpu-voltage
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))