Also test powerline.bindings.pdb module

This commit is contained in:
ZyX 2015-01-31 18:10:19 +03:00
parent 47dbdd571d
commit ef02ab70fb
4 changed files with 241 additions and 21 deletions

View File

@ -86,9 +86,4 @@ s


View File

@ -0,0 +1,224 @@
 1  pdb-script.py:2 <module>  s
-> class Foo(object):
 1  pdb-script.py:6 <module>  
--Call--
-> class Foo(object):
 2  pdb-script.py:6 <module>  pdb-script.py:6 Foo  
-> class Foo(object):
 2  pdb-script.py:6 <module>  pdb-script.py:6 Foo  
-> def __init__(self):
 2  pdb-script.py:6 <module>  pdb-script.py:7 Foo  
-> @classmethod
 2  pdb-script.py:6 <module>  pdb-script.py:13 Foo  
-> @staticmethod
 2  pdb-script.py:6 <module>  pdb-script.py:17 Foo  
-> def bra(self):
 2  pdb-script.py:6 <module>  pdb-script.py:21 Foo  
--Return--
-> def bra(self):
 2  pdb-script.py:6 <module>  pdb-script.py:21 Foo  
-> def brah():
 1  pdb-script.py:25 <module>  
-> f = Foo()
 1  pdb-script.py:29 <module>  
--Call--
-> def __init__(self):
 2  pdb-script.py:29 <module>  pdb-script.py:7 __init__  
-> nop('__init__')
 2  pdb-script.py:29 <module>  pdb-script.py:8 __init__  
--Call--
-> def nop(_):
 3  pdb-script.py:29 <module>  pdb-script.py:8 __init__  pdb-script.py:2 nop  
-> pass
 3  pdb-script.py:29 <module>  pdb-script.py:8 __init__  pdb-script.py:3 nop  
--Return--
-> pass
 3  pdb-script.py:29 <module>  pdb-script.py:8 __init__  pdb-script.py:3 nop  
-> self.bar()
 2  pdb-script.py:29 <module>  pdb-script.py:9 __init__  
--Call--
-> @classmethod
 3  pdb-script.py:29 <module>  pdb-script.py:9 __init__  pdb-script.py:13 bar  
-> nop(cls.__name__)
 3  pdb-script.py:29 <module>  pdb-script.py:9 __init__  pdb-script.py:15 bar  
--Call--
-> def nop(_):
 4  pdb-script.py:9 __init__  pdb-script.py:15 bar  pdb-script.py:2 nop  
-> pass
 4  pdb-script.py:9 __init__  pdb-script.py:15 bar  pdb-script.py:3 nop  
--Return--
-> pass
 4  pdb-script.py:9 __init__  pdb-script.py:15 bar  pdb-script.py:3 nop  
--Return--
-> nop(cls.__name__)
 3  pdb-script.py:29 <module>  pdb-script.py:9 __init__  pdb-script.py:15 bar  
-> self.baz()
 2  pdb-script.py:29 <module>  pdb-script.py:10 __init__  
--Call--
-> @staticmethod
 3  pdb-script.py:29 <module>  pdb-script.py:10 __init__  pdb-script.py:17 baz  
-> nop(1)
 3  pdb-script.py:29 <module>  pdb-script.py:10 __init__  pdb-script.py:19 baz  
--Call--
-> def nop(_):
 4  pdb-script.py:10 __init__  pdb-script.py:19 baz  pdb-script.py:2 nop  
-> pass
 4  pdb-script.py:10 __init__  pdb-script.py:19 baz  pdb-script.py:3 nop  
--Return--
-> pass
 4  pdb-script.py:10 __init__  pdb-script.py:19 baz  pdb-script.py:3 nop  
--Return--
-> nop(1)
 3  pdb-script.py:29 <module>  pdb-script.py:10 __init__  pdb-script.py:19 baz  
-> self.bra()
 2  pdb-script.py:29 <module>  pdb-script.py:11 __init__  
--Call--
-> def bra(self):
 3  pdb-script.py:29 <module>  pdb-script.py:11 __init__  pdb-script.py:21 bra  
-> nop(self.__class__.__name__)
 3  pdb-script.py:29 <module>  pdb-script.py:11 __init__  pdb-script.py:22 bra  
--Call--
-> def nop(_):
 4  pdb-script.py:11 __init__  pdb-script.py:22 bra  pdb-script.py:2 nop  
-> pass
 4  pdb-script.py:11 __init__  pdb-script.py:22 bra  pdb-script.py:3 nop  
--Return--
-> pass
 4  pdb-script.py:11 __init__  pdb-script.py:22 bra  pdb-script.py:3 nop  
--Return--
-> nop(self.__class__.__name__)
 3  pdb-script.py:29 <module>  pdb-script.py:11 __init__  pdb-script.py:22 bra  
--Return--
-> self.bra()
 2  pdb-script.py:29 <module>  pdb-script.py:11 __init__  
-> Foo.bar()
 1  pdb-script.py:30 <module>  
--Call--
-> @classmethod
 2  pdb-script.py:30 <module>  pdb-script.py:13 bar  
-> nop(cls.__name__)
 2  pdb-script.py:30 <module>  pdb-script.py:15 bar  
--Call--
-> def nop(_):
 3  pdb-script.py:30 <module>  pdb-script.py:15 bar  pdb-script.py:2 nop  
-> pass
 3  pdb-script.py:30 <module>  pdb-script.py:15 bar  pdb-script.py:3 nop  
--Return--
-> pass
 3  pdb-script.py:30 <module>  pdb-script.py:15 bar  pdb-script.py:3 nop  
--Return--
-> nop(cls.__name__)
 2  pdb-script.py:30 <module>  pdb-script.py:15 bar  
-> Foo.baz()
 1  pdb-script.py:31 <module>  
--Call--
-> @staticmethod
 2  pdb-script.py:31 <module>  pdb-script.py:17 baz  
-> nop(1)
 2  pdb-script.py:31 <module>  pdb-script.py:19 baz  
--Call--
-> def nop(_):
 3  pdb-script.py:31 <module>  pdb-script.py:19 baz  pdb-script.py:2 nop  
-> pass
 3  pdb-script.py:31 <module>  pdb-script.py:19 baz  pdb-script.py:3 nop  
--Return--
-> pass
 3  pdb-script.py:31 <module>  pdb-script.py:19 baz  pdb-script.py:3 nop  
--Return--
-> nop(1)
 2  pdb-script.py:31 <module>  pdb-script.py:19 baz  
-> Foo.bra(f)
 1  pdb-script.py:32 <module>  
--Call--
-> def bra(self):
 2  pdb-script.py:32 <module>  pdb-script.py:21 bra  
-> nop(self.__class__.__name__)
 2  pdb-script.py:32 <module>  pdb-script.py:22 bra  
--Call--
-> def nop(_):
 3  pdb-script.py:32 <module>  pdb-script.py:22 bra  pdb-script.py:2 nop  
-> pass
 3  pdb-script.py:32 <module>  pdb-script.py:22 bra  pdb-script.py:3 nop  
--Return--
-> pass
 3  pdb-script.py:32 <module>  pdb-script.py:22 bra  pdb-script.py:3 nop  
--Return--
-> nop(self.__class__.__name__)
 2  pdb-script.py:32 <module>  pdb-script.py:22 bra  
-> f.bar()
 1  pdb-script.py:34 <module>  
--Call--
-> @classmethod
 2  pdb-script.py:34 <module>  pdb-script.py:13 bar  
-> nop(cls.__name__)
 2  pdb-script.py:34 <module>  pdb-script.py:15 bar  
--Call--
-> def nop(_):
 3  pdb-script.py:34 <module>  pdb-script.py:15 bar  pdb-script.py:2 nop  
-> pass
 3  pdb-script.py:34 <module>  pdb-script.py:15 bar  pdb-script.py:3 nop  
--Return--
-> pass
 3  pdb-script.py:34 <module>  pdb-script.py:15 bar  pdb-script.py:3 nop  
--Return--
-> nop(cls.__name__)
 2  pdb-script.py:34 <module>  pdb-script.py:15 bar  
-> f.baz()
 1  pdb-script.py:35 <module>  
--Call--
-> @staticmethod
 2  pdb-script.py:35 <module>  pdb-script.py:17 baz  
-> nop(1)
 2  pdb-script.py:35 <module>  pdb-script.py:19 baz  
--Call--
-> def nop(_):
 3  pdb-script.py:35 <module>  pdb-script.py:19 baz  pdb-script.py:2 nop  
-> pass
 3  pdb-script.py:35 <module>  pdb-script.py:19 baz  pdb-script.py:3 nop  
--Return--
-> pass
 3  pdb-script.py:35 <module>  pdb-script.py:19 baz  pdb-script.py:3 nop  
--Return--
-> nop(1)
 2  pdb-script.py:35 <module>  pdb-script.py:19 baz  
-> f.bra()
 1  pdb-script.py:36 <module>  
--Call--
-> def bra(self):
 2  pdb-script.py:36 <module>  pdb-script.py:21 bra  
-> nop(self.__class__.__name__)
 2  pdb-script.py:36 <module>  pdb-script.py:22 bra  
--Call--
-> def nop(_):
 3  pdb-script.py:36 <module>  pdb-script.py:22 bra  pdb-script.py:2 nop  
-> pass
 3  pdb-script.py:36 <module>  pdb-script.py:22 bra  pdb-script.py:3 nop  
--Return--
-> pass
 3  pdb-script.py:36 <module>  pdb-script.py:22 bra  pdb-script.py:3 nop  
--Return--
-> nop(self.__class__.__name__)
 2  pdb-script.py:36 <module>  pdb-script.py:22 bra  
-> brah()
 1  pdb-script.py:38 <module>  
--Call--
-> def brah():
 2  pdb-script.py:38 <module>  pdb-script.py:25 brah  
-> nop('brah')
 2  pdb-script.py:38 <module>  pdb-script.py:26 brah  
--Call--
-> def nop(_):
 3  pdb-script.py:38 <module>  pdb-script.py:26 brah  pdb-script.py:2 nop  
-> pass
 3  pdb-script.py:38 <module>  pdb-script.py:26 brah  pdb-script.py:3 nop  
--Return--
-> pass
 3  pdb-script.py:38 <module>  pdb-script.py:26 brah  pdb-script.py:3 nop  
--Return--
-> nop('brah')
 2  pdb-script.py:38 <module>  pdb-script.py:26 brah  
--Return--
-> brah()
 1  pdb-script.py:38 <module>  
--Return--
 0  

View File

@ -221,10 +221,3 @@
--Return--
-> nop('brah')
 3  <string>:1 <module>  pdb-script.py:38 <module>  pdb-script.py:26 brah  
--Return--
-> brah()
 2  <string>:1 <module>  pdb-script.py:38 <module>  
--Return--
 1  <string>:1 <module>  
-> self.quitting = True
 0  

View File

@ -122,7 +122,8 @@ do_run_test() {
) \
|| ( \
test "x${SH}" = "xpdb" \
&& ( test "$PYTHON_VERSION_MAJOR" -eq 3 \
&& ( \
test "$PYTHON_VERSION_MAJOR" -eq 3 \
&& test "$PYTHON_VERSION_MINOR" -eq 2 \
&& test "$PYTHON_IMPLEMENTATION" = "CPython" \
) \
@ -436,14 +437,21 @@ if ( test "x${ONLY_SHELL}" = "x" || test "x${ONLY_SHELL}" = "xzsh" ) \
fi
fi
if ( test "x${ONLY_SHELL}" = "x" || test "x${ONLY_SHELL}" = "xpdb" ) \
&& ( test "x${ONLY_TEST_TYPE}" = "x" || test "x${ONLY_TEST_TYPE}" = "xsubclass" )
then
if test "x${ONLY_SHELL}" = "x" || test "x${ONLY_SHELL}" = "xpdb" ; then
if ! ( test "$PYTHON_IMPLEMENTATION" = "PyPy" && test "$PYTHON_VERSION_MAJOR" = 2 ) ; then
echo "> pdb subclass"
if ! run_test pdb subclass $PDB_PYTHON "$PWD/tests/test_shells/pdb-main.py" ; then
FAILED=1
FAIL_SUMMARY="${FAIL_SUMMARY}${NL}T pdb $PDB_PYTHON -m $PWD/tests/test_shells/pdb-main.py"
if test "x${ONLY_TEST_TYPE}" = "x" || test "x${ONLY_TEST_TYPE}" = "xsubclass" ; then
echo "> pdb subclass"
if ! run_test subclass python $PDB_PYTHON "$PWD/tests/test_shells/pdb-main.py" ; then
FAILED=1
FAIL_SUMMARY="${FAIL_SUMMARY}${NL}T pdb $PDB_PYTHON $PWD/tests/test_shells/pdb-main.py"
fi
fi
if test "x${ONLY_TEST_TYPE}" = "x" || test "x${ONLY_TEST_TYPE}" = "xmodule" ; then
echo "> pdb module"
if ! run_test module python $PDB_PYTHON -mpowerline.bindings.pdb "$PWD/tests/test_shells/pdb-script.py" ; then
FAILED=1
FAIL_SUMMARY="${FAIL_SUMMARY}${NL}T pdb $PDB_PYTHON -mpowerline.bindings.pdb $PWD/tests/test_shells/pdb-script"
fi
fi
fi
fi