summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bytes.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_bytes.py')
-rw-r--r--Lib/test/test_bytes.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py
index 2813d96..f05bd96 100644
--- a/Lib/test/test_bytes.py
+++ b/Lib/test/test_bytes.py
@@ -229,8 +229,8 @@ class BaseBytesTest(unittest.TestCase):
def test_contains(self):
b = self.type2test(b"abc")
- self.assertTrue(ord('a') in b)
- self.assertTrue(int(ord('a')) in b)
+ self.assertIn(ord('a'), b)
+ self.assertIn(int(ord('a')), b)
self.assertFalse(200 in b)
self.assertFalse(200 in b)
self.assertRaises(ValueError, lambda: 300 in b)
@@ -239,13 +239,13 @@ class BaseBytesTest(unittest.TestCase):
self.assertRaises(TypeError, lambda: float(ord('a')) in b)
self.assertRaises(TypeError, lambda: "a" in b)
for f in bytes, bytearray:
- self.assertTrue(f(b"") in b)
- self.assertTrue(f(b"a") in b)
- self.assertTrue(f(b"b") in b)
- self.assertTrue(f(b"c") in b)
- self.assertTrue(f(b"ab") in b)
- self.assertTrue(f(b"bc") in b)
- self.assertTrue(f(b"abc") in b)
+ self.assertIn(f(b""), b)
+ self.assertIn(f(b"a"), b)
+ self.assertIn(f(b"b"), b)
+ self.assertIn(f(b"c"), b)
+ self.assertIn(f(b"ab"), b)
+ self.assertIn(f(b"bc"), b)
+ self.assertIn(f(b"abc"), b)
self.assertFalse(f(b"ac") in b)
self.assertFalse(f(b"d") in b)
self.assertFalse(f(b"dab") in b)