summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2019-04-02 16:47:56 +0200
committerArmin Rigo <arigo@tunes.org>2019-04-02 16:47:56 +0200
commitd62f286d2f621fbc7dbe1a5f666e3337c084e3e1 (patch)
tree2cce464e742e2b887ce0d25bdd85735eb048dfd6
parent22887ae7ec10a217b0267ea8a6106ec3b8dd44b3 (diff)
downloadcffi-d62f286d2f621fbc7dbe1a5f666e3337c084e3e1.tar.gz
Two more cases
-rw-r--r--c/test_c.py4
1 files changed, 4 insertions, 0 deletions
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))