From 62a74a6d2f5d25b4c765080d9458e679e21271fc Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Thu, 30 Jan 2014 11:27:03 +0100 Subject: [PATCH] tests for understanding operations --- test/completion/operations.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/completion/operations.py diff --git a/test/completion/operations.py b/test/completion/operations.py new file mode 100644 index 00000000..99348f95 --- /dev/null +++ b/test/completion/operations.py @@ -0,0 +1,25 @@ +""" +Test Jedi's operation understanding. Jedi should understand simple additions, +multiplications, etc. +""" +x = [1, '', 'a', 1.0] + +#? int() str() float() +x[12] + +#? str() +x[1 + 1] + +index = 0 + 1 + +#? str() +x[index] + + +def calculate(number): + return number + constant + +constant = 1 + +#? float() +x[calculate(2)]