From d62f286d2f621fbc7dbe1a5f666e3337c084e3e1 Mon Sep 17 00:00:00 2001 From: Armin Rigo Date: Tue, 2 Apr 2019 16:47:56 +0200 Subject: Two more cases --- c/test_c.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'c') diff --git a/c/test_c.py b/c/test_c.py index 4aec6ae..9f30b76 100644 --- a/c/test_c.py +++ b/c/test_c.py @@ -4363,3 +4363,7 @@ def test_int_doesnt_give_bool(): assert type(x) is int and x == 1 x = long(cast(BBool, 42)) assert type(x) is long and x == 1 + with pytest.raises(TypeError): + float(cast(BBool, 42)) + with pytest.raises(TypeError): + complex(cast(BBool, 42)) -- cgit v1.2.1