Snapshot idea/138.1696 from git://git.jetbrains.org/idea/community.git
Change-Id: I50c97b83a815ce635e49a38380ba5b8765e4b16a
diff --git a/python/testData/debug/Adder-0.1.egg b/python/testData/debug/Adder-0.1.egg
new file mode 100644
index 0000000..eb98b6a
--- /dev/null
+++ b/python/testData/debug/Adder-0.1.egg
Binary files differ
diff --git a/python/testData/debug/Test_Resume.py b/python/testData/debug/Test_Resume.py
new file mode 100644
index 0000000..dcec51c
--- /dev/null
+++ b/python/testData/debug/Test_Resume.py
@@ -0,0 +1,8 @@
+def foo(x):
+ print(x)
+
+foo(1)
+foo(2)
+
+
+
diff --git a/python/testData/debug/__init__.py b/python/testData/debug/__init__.py
new file mode 100644
index 0000000..595e381
--- /dev/null
+++ b/python/testData/debug/__init__.py
@@ -0,0 +1 @@
+__author__ = 'traff'
diff --git a/python/testData/debug/pycharm-debug.egg b/python/testData/debug/pycharm-debug.egg
new file mode 100644
index 0000000..5a17292
--- /dev/null
+++ b/python/testData/debug/pycharm-debug.egg
Binary files differ
diff --git a/python/testData/debug/test1.py b/python/testData/debug/test1.py
new file mode 100644
index 0000000..f654959
--- /dev/null
+++ b/python/testData/debug/test1.py
@@ -0,0 +1,5 @@
+i = 0
+while True:
+ print(i)
+ i = i + 1
+
diff --git a/python/testData/debug/test2.py b/python/testData/debug/test2.py
new file mode 100644
index 0000000..246363a
--- /dev/null
+++ b/python/testData/debug/test2.py
@@ -0,0 +1,8 @@
+def foo(x):
+ y = x + 2
+ print(y)
+
+z = 1
+foo(z)
+z += 1
+print(z)
diff --git a/python/testData/debug/test3.py b/python/testData/debug/test3.py
new file mode 100644
index 0000000..6122a53
--- /dev/null
+++ b/python/testData/debug/test3.py
@@ -0,0 +1,26 @@
+class A:
+ def __init__(self, z):
+ self.z = z
+
+ def foo(self, x):
+ y = 2 * x + self.z
+ return 1 + y
+
+
+def zoo(x):
+ y = int((x - 2) / (x - 1))
+
+ return A(y)
+
+print(zoo(2).foo(2))
+
+try:
+ try:
+ print(zoo(1).foo(2)) #we got ZeroDivision here
+ finally:
+ print(zoo(0).foo(2))
+except:
+ pass
+
+a = zoo(-1)
+print(a.foo(2))
\ No newline at end of file
diff --git a/python/testData/debug/test4.py b/python/testData/debug/test4.py
new file mode 100644
index 0000000..b8b7e91
--- /dev/null
+++ b/python/testData/debug/test4.py
@@ -0,0 +1,5 @@
+xval = 0
+xvalue1 = 1
+xvalue2 = 2
+print(xvalue1 + xvalue2)
+
diff --git a/python/testData/debug/test_continuation.py b/python/testData/debug/test_continuation.py
new file mode 100644
index 0000000..5957e3d
--- /dev/null
+++ b/python/testData/debug/test_continuation.py
@@ -0,0 +1,16 @@
+class Boo:
+ def bu(self, y):
+ return 1 + y
+
+
+class Foo:
+ def fu(self):
+ return Boo()
+
+x = 0
+print(x)
+x = Foo().fu()\
+.bu(x)
+print(x)
+x=2
+print(x)
\ No newline at end of file
diff --git a/python/testData/debug/test_continuation2.py b/python/testData/debug/test_continuation2.py
new file mode 100644
index 0000000..3b0246d
--- /dev/null
+++ b/python/testData/debug/test_continuation2.py
@@ -0,0 +1,8 @@
+x = 0
+print(x)
+x = 1+\
+2+\
+3
+print(x)
+x=2
+print(x)
\ No newline at end of file
diff --git a/python/testData/debug/test_egg.py b/python/testData/debug/test_egg.py
new file mode 100644
index 0000000..82bec29
--- /dev/null
+++ b/python/testData/debug/test_egg.py
@@ -0,0 +1,4 @@
+from adder import adder
+
+x = adder.add(7, 9)
+print(x)
\ No newline at end of file
diff --git a/python/testData/debug/test_exceptbreak.py b/python/testData/debug/test_exceptbreak.py
new file mode 100644
index 0000000..46b0ebc
--- /dev/null
+++ b/python/testData/debug/test_exceptbreak.py
@@ -0,0 +1,8 @@
+def foo(x):
+ return 1/x
+
+def zoo(x):
+ res = foo(x)
+ return res
+
+print(zoo(0))
diff --git a/python/testData/debug/test_input.py b/python/testData/debug/test_input.py
new file mode 100644
index 0000000..5ac9bac
--- /dev/null
+++ b/python/testData/debug/test_input.py
@@ -0,0 +1,7 @@
+while True:
+ promt = "print command > "
+ try:
+ string = raw_input(promt)
+ except :
+ string = input(promt)
+ print ("command was " + string)
\ No newline at end of file
diff --git a/python/testData/debug/test_multiprocess.py b/python/testData/debug/test_multiprocess.py
new file mode 100644
index 0000000..5fc6be4
--- /dev/null
+++ b/python/testData/debug/test_multiprocess.py
@@ -0,0 +1,13 @@
+from concurrent.futures import ProcessPoolExecutor
+def my_foo(arg_):
+ return arg_
+
+def main():
+ arg = ['Result:OK']
+ with ProcessPoolExecutor(1) as exec:
+ result = exec.map(my_foo, arg)
+ for i in result:
+ print(i)
+
+if __name__ == '__main__':
+ main()
\ No newline at end of file
diff --git a/python/testData/debug/test_multithread.py b/python/testData/debug/test_multithread.py
new file mode 100644
index 0000000..03c0811
--- /dev/null
+++ b/python/testData/debug/test_multithread.py
@@ -0,0 +1,24 @@
+try:
+ import thread
+except :
+ import _thread as thread
+
+import threading
+
+def bar(y):
+ z = 100 + y
+ print("Z=%d"%z)
+
+def foo(x):
+ y = x + 1
+ print("Y=%d"%y)
+
+ t = threading.Thread(target=bar, args=(y,))
+ t.start()
+
+
+id = thread.start_new_thread(foo, (1,))
+
+while True:
+ pass
+
diff --git a/python/testData/debug/test_remote.py b/python/testData/debug/test_remote.py
new file mode 100644
index 0000000..8bccbeb
--- /dev/null
+++ b/python/testData/debug/test_remote.py
@@ -0,0 +1,19 @@
+import sys
+
+if __name__ == '__main__':
+ if len(sys.argv) < 2:
+ sys.stderr.write("Not enough arguments")
+ sys.exit(1)
+
+ port = int(sys.argv[1])
+
+ x = 0
+
+ from pydev import pydevd
+ pydevd.settrace('localhost', port=port, stdoutToServer=True, stderrToServer=True)
+
+ x = 1
+ x = 2
+ x = 3
+
+ print("OK")
diff --git a/python/testData/debug/test_runtoline.py b/python/testData/debug/test_runtoline.py
new file mode 100644
index 0000000..804c56c
--- /dev/null
+++ b/python/testData/debug/test_runtoline.py
@@ -0,0 +1,8 @@
+x = 0
+print(x)
+while x<2:
+ x+=1
+ print(x)
+
+x+=10
+print("x = %d" % x)
\ No newline at end of file
diff --git a/python/testData/debug/test_stepOverCondition.py b/python/testData/debug/test_stepOverCondition.py
new file mode 100644
index 0000000..1b41c60
--- /dev/null
+++ b/python/testData/debug/test_stepOverCondition.py
@@ -0,0 +1,4 @@
+x = 1
+y = 2
+y = x + y
+print(y)
\ No newline at end of file
diff --git a/python/testData/debug/zipped_lib.zip b/python/testData/debug/zipped_lib.zip
new file mode 100644
index 0000000..fe2ac04
--- /dev/null
+++ b/python/testData/debug/zipped_lib.zip
Binary files differ