From 51413c8cb63bfdc4fba3f0a144459b0082ce2bf2 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 1 Apr 2014 13:47:39 +0300 Subject: [PATCH] tests: Add test for implicit float to int conversion (not allowed!) --- tests/basics/list1.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/basics/list1.py b/tests/basics/list1.py index 8dc3939dd6..122f61d493 100644 --- a/tests/basics/list1.py +++ b/tests/basics/list1.py @@ -20,3 +20,8 @@ print(x) print(x[1:]) print(x[:-1]) print(x[2:3]) + +try: + print(x[1.0]) +except TypeError: + print("TypeError")