diff options
Diffstat (limited to 'tests/test_compat.py')
-rw-r--r-- | tests/test_compat.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_compat.py b/tests/test_compat.py index 8cbf101..74d6f53 100644 --- a/tests/test_compat.py +++ b/tests/test_compat.py @@ -16,8 +16,9 @@ import unittest import struct +import sys -from rsa._compat import is_bytes, byte +from rsa._compat import is_bytes, byte, b class TestByte(unittest.TestCase): @@ -30,3 +31,6 @@ class TestByte(unittest.TestCase): def test_raises_StructError_on_overflow(self): self.assertRaises(struct.error, byte, 256) self.assertRaises(struct.error, byte, -1) + + def test_byte_literal(self): + self.assertIsInstance(b('abc'), bytes) |