From 214179b430ebc1101e28b19248b6166f5e511e6b Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 25 Mar 2015 23:10:09 +0000 Subject: tests: Add tests for SyntaxError, TypeError, and other missing things. This is intended to improve coverage of the test suite. --- tests/basics/array1.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/basics/array1.py') diff --git a/tests/basics/array1.py b/tests/basics/array1.py index 6f70fdb91..bce22cc57 100644 --- a/tests/basics/array1.py +++ b/tests/basics/array1.py @@ -11,3 +11,12 @@ print(i[-1]) print(len(array.array('h'))) print(array.array('i')) +# bool operator acting on arrays +print(bool(array.array('i'))) +print(bool(array.array('i', [1]))) + +# bad typecode +try: + array.array('X') +except ValueError: + print("ValueError") -- cgit v1.2.3