summaryrefslogtreecommitdiffstats
path: root/support/testing/tests/package/sample_python_bitstring.py
diff options
context:
space:
mode:
Diffstat (limited to 'support/testing/tests/package/sample_python_bitstring.py')
-rw-r--r--support/testing/tests/package/sample_python_bitstring.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/support/testing/tests/package/sample_python_bitstring.py b/support/testing/tests/package/sample_python_bitstring.py
new file mode 100644
index 0000000000..2cc10dba65
--- /dev/null
+++ b/support/testing/tests/package/sample_python_bitstring.py
@@ -0,0 +1,6 @@
+import bitstring
+
+value = bitstring.BitArray("uint:12=42")
+assert(value.hex == "02a")
+assert(value.bin == "000000101010")
+assert(value.uint == 42)
OpenPOWER on IntegriCloud