hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [09/28] incubator-hawq git commit: HAWQ-837. Add python modules into HAWQ code
Date Tue, 21 Jun 2016 02:41:25 GMT
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-operatorPlus
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-operatorPlus b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-operatorPlus
new file mode 100644
index 0000000..3de3e4f
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-operatorPlus
@@ -0,0 +1,48 @@
+tests/badparse.py:1 Unable to parse: could not parse string
+
+tests/class.py:20 Method x defined at line 28 in class A redefined
+tests/class.py:21 Class A has no attribute w
+tests/class.py:28 Method x is missing self parameter
+tests/class.py:38 Class A has no attribute w
+
+tests/global.py:3 Unknown identifier: y
+
+tests/import.py:1 Identifier (bar) not used
+tests/import.py:3 Identifier (nifty) not used
+tests/import.py:7 Import of "join" is duplicate of import in parent scope <ModuleScope: global>
+tests/import.py:9 Unknown identifier: __all__
+tests/import.py:13 Error trying to import xYzZy: No module named xYzZy
+tests/import.py:14 Unknown identifier: z
+tests/import.py:17 Identifier (getopt) not used
+tests/import.py:17 Import of "getopt" is duplicate in current scope
+tests/import.py:18 Import of "join" duplicates import from module posixpath at 4
+tests/import.py:18 Import of "split" duplicates import from module posixpath at 4
+
+tests/not_there.py:[unknown line] Unable to parse: [Errno 2] No such file or directory: 'tests/not_there.py'
+
+tests/op.py:2 Operator (++) doesn't exist, statement has no effect
+tests/op.py:4 Scope (g) is redefined at line 7
+tests/op.py:8 Operator (--) doesn't exist, statement has no effect
+
+tests/self.py:9 First argument to method f (x) is not in ['self', 'this', 's']
+tests/self.py:14 Identifier (a) not used
+
+tests/shadow.py:2 Scope (f) is redefined at line 8
+tests/shadow.py:4 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:15 Identifier (a) not used
+tests/shadow.py:15 Identifier (b) not used
+tests/shadow.py:15 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:16 Identifier (f) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:17 Identifier (a) not used
+tests/shadow.py:17 Identifier (a) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:17 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:18 Identifier (b) not used
+tests/shadow.py:18 Identifier (b) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:19 Unknown identifier: c
+tests/shadow.py:19 Unknown identifier: d
+tests/shadow.py:22 Identifier (a) shadows definition in scope <ModuleScope: global>
+
+tests/unused.py:6 Identifier (Test) not used
+
+tests/unusedImport.py:1 Identifier (sys) not used
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-redefinedScope
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-redefinedScope b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-redefinedScope
new file mode 100644
index 0000000..e3df55a
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-redefinedScope
@@ -0,0 +1,47 @@
+tests/badparse.py:1 Unable to parse: could not parse string
+
+tests/class.py:20 Method x defined at line 28 in class A redefined
+tests/class.py:21 Class A has no attribute w
+tests/class.py:28 Method x is missing self parameter
+tests/class.py:38 Class A has no attribute w
+
+tests/global.py:3 Unknown identifier: y
+
+tests/import.py:1 Identifier (bar) not used
+tests/import.py:3 Identifier (nifty) not used
+tests/import.py:7 Import of "join" is duplicate of import in parent scope <ModuleScope: global>
+tests/import.py:9 Unknown identifier: __all__
+tests/import.py:13 Error trying to import xYzZy: No module named xYzZy
+tests/import.py:14 Unknown identifier: z
+tests/import.py:17 Identifier (getopt) not used
+tests/import.py:17 Import of "getopt" is duplicate in current scope
+tests/import.py:18 Import of "join" duplicates import from module posixpath at 4
+tests/import.py:18 Import of "split" duplicates import from module posixpath at 4
+
+tests/not_there.py:[unknown line] Unable to parse: [Errno 2] No such file or directory: 'tests/not_there.py'
+
+tests/op.py:2 Operator (++) doesn't exist, statement has no effect
+tests/op.py:5 Operator (+) normally has no effect
+tests/op.py:8 Operator (--) doesn't exist, statement has no effect
+
+tests/self.py:9 First argument to method f (x) is not in ['self', 'this', 's']
+tests/self.py:14 Identifier (a) not used
+
+tests/shadow.py:4 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:15 Identifier (a) not used
+tests/shadow.py:15 Identifier (b) not used
+tests/shadow.py:15 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:16 Identifier (f) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:17 Identifier (a) not used
+tests/shadow.py:17 Identifier (a) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:17 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:18 Identifier (b) not used
+tests/shadow.py:18 Identifier (b) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:19 Unknown identifier: c
+tests/shadow.py:19 Unknown identifier: d
+tests/shadow.py:22 Identifier (a) shadows definition in scope <ModuleScope: global>
+
+tests/unused.py:6 Identifier (Test) not used
+
+tests/unusedImport.py:1 Identifier (sys) not used
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-selfName
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-selfName b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-selfName
new file mode 100644
index 0000000..a4decde
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-selfName
@@ -0,0 +1,48 @@
+tests/badparse.py:1 Unable to parse: could not parse string
+
+tests/class.py:20 Method x defined at line 28 in class A redefined
+tests/class.py:21 Class A has no attribute w
+tests/class.py:28 Method x is missing self parameter
+tests/class.py:38 Class A has no attribute w
+
+tests/global.py:3 Unknown identifier: y
+
+tests/import.py:1 Identifier (bar) not used
+tests/import.py:3 Identifier (nifty) not used
+tests/import.py:7 Import of "join" is duplicate of import in parent scope <ModuleScope: global>
+tests/import.py:9 Unknown identifier: __all__
+tests/import.py:13 Error trying to import xYzZy: No module named xYzZy
+tests/import.py:14 Unknown identifier: z
+tests/import.py:17 Identifier (getopt) not used
+tests/import.py:17 Import of "getopt" is duplicate in current scope
+tests/import.py:18 Import of "join" duplicates import from module posixpath at 4
+tests/import.py:18 Import of "split" duplicates import from module posixpath at 4
+
+tests/not_there.py:[unknown line] Unable to parse: [Errno 2] No such file or directory: 'tests/not_there.py'
+
+tests/op.py:2 Operator (++) doesn't exist, statement has no effect
+tests/op.py:4 Scope (g) is redefined at line 7
+tests/op.py:5 Operator (+) normally has no effect
+tests/op.py:8 Operator (--) doesn't exist, statement has no effect
+
+tests/self.py:14 Identifier (a) not used
+
+tests/shadow.py:2 Scope (f) is redefined at line 8
+tests/shadow.py:4 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:15 Identifier (a) not used
+tests/shadow.py:15 Identifier (b) not used
+tests/shadow.py:15 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:16 Identifier (f) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:17 Identifier (a) not used
+tests/shadow.py:17 Identifier (a) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:17 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:18 Identifier (b) not used
+tests/shadow.py:18 Identifier (b) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:19 Unknown identifier: c
+tests/shadow.py:19 Unknown identifier: d
+tests/shadow.py:22 Identifier (a) shadows definition in scope <ModuleScope: global>
+
+tests/unused.py:6 Identifier (Test) not used
+
+tests/unusedImport.py:1 Identifier (sys) not used
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-shadowIdentifier
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-shadowIdentifier b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-shadowIdentifier
new file mode 100644
index 0000000..93ce959
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-shadowIdentifier
@@ -0,0 +1,42 @@
+tests/badparse.py:1 Unable to parse: could not parse string
+
+tests/class.py:20 Method x defined at line 28 in class A redefined
+tests/class.py:21 Class A has no attribute w
+tests/class.py:28 Method x is missing self parameter
+tests/class.py:38 Class A has no attribute w
+
+tests/global.py:3 Unknown identifier: y
+
+tests/import.py:1 Identifier (bar) not used
+tests/import.py:3 Identifier (nifty) not used
+tests/import.py:7 Import of "join" is duplicate of import in parent scope <ModuleScope: global>
+tests/import.py:9 Unknown identifier: __all__
+tests/import.py:13 Error trying to import xYzZy: No module named xYzZy
+tests/import.py:14 Unknown identifier: z
+tests/import.py:17 Identifier (getopt) not used
+tests/import.py:17 Import of "getopt" is duplicate in current scope
+tests/import.py:18 Import of "join" duplicates import from module posixpath at 4
+tests/import.py:18 Import of "split" duplicates import from module posixpath at 4
+
+tests/not_there.py:[unknown line] Unable to parse: [Errno 2] No such file or directory: 'tests/not_there.py'
+
+tests/op.py:2 Operator (++) doesn't exist, statement has no effect
+tests/op.py:4 Scope (g) is redefined at line 7
+tests/op.py:5 Operator (+) normally has no effect
+tests/op.py:8 Operator (--) doesn't exist, statement has no effect
+
+tests/self.py:9 First argument to method f (x) is not in ['self', 'this', 's']
+tests/self.py:14 Identifier (a) not used
+
+tests/shadow.py:2 Scope (f) is redefined at line 8
+tests/shadow.py:15 Identifier (a) not used
+tests/shadow.py:15 Identifier (b) not used
+tests/shadow.py:17 Identifier (a) not used
+tests/shadow.py:18 Identifier (b) not used
+tests/shadow.py:19 Unknown identifier: c
+tests/shadow.py:19 Unknown identifier: d
+
+tests/unused.py:6 Identifier (Test) not used
+
+tests/unusedImport.py:1 Identifier (sys) not used
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-syntaxErrors
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-syntaxErrors b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-syntaxErrors
new file mode 100644
index 0000000..ab26963
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-syntaxErrors
@@ -0,0 +1,45 @@
+tests/class.py:20 Method x defined at line 28 in class A redefined
+tests/class.py:21 Class A has no attribute w
+tests/class.py:28 Method x is missing self parameter
+tests/class.py:38 Class A has no attribute w
+
+tests/global.py:3 Unknown identifier: y
+
+tests/import.py:1 Identifier (bar) not used
+tests/import.py:3 Identifier (nifty) not used
+tests/import.py:7 Import of "join" is duplicate of import in parent scope <ModuleScope: global>
+tests/import.py:9 Unknown identifier: __all__
+tests/import.py:13 Error trying to import xYzZy: No module named xYzZy
+tests/import.py:14 Unknown identifier: z
+tests/import.py:17 Identifier (getopt) not used
+tests/import.py:17 Import of "getopt" is duplicate in current scope
+tests/import.py:18 Import of "join" duplicates import from module posixpath at 4
+tests/import.py:18 Import of "split" duplicates import from module posixpath at 4
+
+tests/op.py:2 Operator (++) doesn't exist, statement has no effect
+tests/op.py:4 Scope (g) is redefined at line 7
+tests/op.py:5 Operator (+) normally has no effect
+tests/op.py:8 Operator (--) doesn't exist, statement has no effect
+
+tests/self.py:9 First argument to method f (x) is not in ['self', 'this', 's']
+tests/self.py:14 Identifier (a) not used
+
+tests/shadow.py:2 Scope (f) is redefined at line 8
+tests/shadow.py:4 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:15 Identifier (a) not used
+tests/shadow.py:15 Identifier (b) not used
+tests/shadow.py:15 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:16 Identifier (f) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:17 Identifier (a) not used
+tests/shadow.py:17 Identifier (a) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:17 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:18 Identifier (b) not used
+tests/shadow.py:18 Identifier (b) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:19 Unknown identifier: c
+tests/shadow.py:19 Unknown identifier: d
+tests/shadow.py:22 Identifier (a) shadows definition in scope <ModuleScope: global>
+
+tests/unused.py:6 Identifier (Test) not used
+
+tests/unusedImport.py:1 Identifier (sys) not used
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-unknown
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-unknown b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-unknown
new file mode 100644
index 0000000..52dc58e
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-unknown
@@ -0,0 +1,43 @@
+tests/badparse.py:1 Unable to parse: could not parse string
+
+tests/class.py:20 Method x defined at line 28 in class A redefined
+tests/class.py:21 Class A has no attribute w
+tests/class.py:28 Method x is missing self parameter
+tests/class.py:38 Class A has no attribute w
+
+tests/import.py:1 Identifier (bar) not used
+tests/import.py:3 Identifier (nifty) not used
+tests/import.py:7 Import of "join" is duplicate of import in parent scope <ModuleScope: global>
+tests/import.py:13 Error trying to import xYzZy: No module named xYzZy
+tests/import.py:17 Identifier (getopt) not used
+tests/import.py:17 Import of "getopt" is duplicate in current scope
+tests/import.py:18 Import of "join" duplicates import from module posixpath at 4
+tests/import.py:18 Import of "split" duplicates import from module posixpath at 4
+
+tests/not_there.py:[unknown line] Unable to parse: [Errno 2] No such file or directory: 'tests/not_there.py'
+
+tests/op.py:2 Operator (++) doesn't exist, statement has no effect
+tests/op.py:4 Scope (g) is redefined at line 7
+tests/op.py:5 Operator (+) normally has no effect
+tests/op.py:8 Operator (--) doesn't exist, statement has no effect
+
+tests/self.py:9 First argument to method f (x) is not in ['self', 'this', 's']
+tests/self.py:14 Identifier (a) not used
+
+tests/shadow.py:2 Scope (f) is redefined at line 8
+tests/shadow.py:4 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:15 Identifier (a) not used
+tests/shadow.py:15 Identifier (b) not used
+tests/shadow.py:15 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:16 Identifier (f) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:17 Identifier (a) not used
+tests/shadow.py:17 Identifier (a) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:17 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:18 Identifier (b) not used
+tests/shadow.py:18 Identifier (b) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:22 Identifier (a) shadows definition in scope <ModuleScope: global>
+
+tests/unused.py:6 Identifier (Test) not used
+
+tests/unusedImport.py:1 Identifier (sys) not used
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-unpackedUsed
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-unpackedUsed b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-unpackedUsed
new file mode 100644
index 0000000..2230ee3
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-unpackedUsed
@@ -0,0 +1,52 @@
+tests/badparse.py:1 Unable to parse: could not parse string
+
+tests/class.py:20 Method x defined at line 28 in class A redefined
+tests/class.py:21 Class A has no attribute w
+tests/class.py:28 Method x is missing self parameter
+tests/class.py:38 Class A has no attribute w
+
+tests/global.py:3 Unknown identifier: y
+
+tests/import.py:1 Identifier (bar) not used
+tests/import.py:3 Identifier (nifty) not used
+tests/import.py:7 Import of "join" is duplicate of import in parent scope <ModuleScope: global>
+tests/import.py:9 Unknown identifier: __all__
+tests/import.py:13 Error trying to import xYzZy: No module named xYzZy
+tests/import.py:14 Unknown identifier: z
+tests/import.py:17 Identifier (getopt) not used
+tests/import.py:17 Import of "getopt" is duplicate in current scope
+tests/import.py:18 Import of "join" duplicates import from module posixpath at 4
+tests/import.py:18 Import of "split" duplicates import from module posixpath at 4
+
+tests/not_there.py:[unknown line] Unable to parse: [Errno 2] No such file or directory: 'tests/not_there.py'
+
+tests/op.py:2 Operator (++) doesn't exist, statement has no effect
+tests/op.py:4 Scope (g) is redefined at line 7
+tests/op.py:5 Operator (+) normally has no effect
+tests/op.py:8 Operator (--) doesn't exist, statement has no effect
+
+tests/self.py:9 First argument to method f (x) is not in ['self', 'this', 's']
+tests/self.py:14 Identifier (a) not used
+
+tests/shadow.py:2 Scope (f) is redefined at line 8
+tests/shadow.py:4 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:15 Identifier (a) not used
+tests/shadow.py:15 Identifier (b) not used
+tests/shadow.py:15 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:16 Identifier (f) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:17 Identifier (a) not used
+tests/shadow.py:17 Identifier (a) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:17 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:18 Identifier (b) not used
+tests/shadow.py:18 Identifier (b) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:19 Unknown identifier: c
+tests/shadow.py:19 Unknown identifier: d
+tests/shadow.py:22 Identifier (a) shadows definition in scope <ModuleScope: global>
+
+tests/unused.py:6 Identifier (Test) not used
+tests/unused.py:30 Identifier (b) not used
+tests/unused.py:30 Identifier (c) not used
+tests/unused.py:30 Identifier (d) not used
+
+tests/unusedImport.py:1 Identifier (sys) not used
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-unused
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-unused b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-unused
new file mode 100644
index 0000000..d378496
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/no-unused
@@ -0,0 +1,36 @@
+tests/badparse.py:1 Unable to parse: could not parse string
+
+tests/class.py:20 Method x defined at line 28 in class A redefined
+tests/class.py:21 Class A has no attribute w
+tests/class.py:28 Method x is missing self parameter
+tests/class.py:38 Class A has no attribute w
+
+tests/global.py:3 Unknown identifier: y
+
+tests/import.py:7 Import of "join" is duplicate of import in parent scope <ModuleScope: global>
+tests/import.py:9 Unknown identifier: __all__
+tests/import.py:13 Error trying to import xYzZy: No module named xYzZy
+tests/import.py:14 Unknown identifier: z
+tests/import.py:17 Import of "getopt" is duplicate in current scope
+tests/import.py:18 Import of "join" duplicates import from module posixpath at 4
+tests/import.py:18 Import of "split" duplicates import from module posixpath at 4
+
+tests/not_there.py:[unknown line] Unable to parse: [Errno 2] No such file or directory: 'tests/not_there.py'
+
+tests/op.py:2 Operator (++) doesn't exist, statement has no effect
+tests/op.py:4 Scope (g) is redefined at line 7
+tests/op.py:5 Operator (+) normally has no effect
+tests/op.py:8 Operator (--) doesn't exist, statement has no effect
+
+tests/self.py:9 First argument to method f (x) is not in ['self', 'this', 's']
+
+tests/shadow.py:2 Scope (f) is redefined at line 8
+tests/shadow.py:4 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:16 Identifier (f) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:17 Identifier (a) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:17 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:18 Identifier (b) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:19 Unknown identifier: c
+tests/shadow.py:19 Unknown identifier: d
+tests/shadow.py:22 Identifier (a) shadows definition in scope <ModuleScope: global>
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/normal
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/normal b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/normal
new file mode 100644
index 0000000..5f4592c
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/normal
@@ -0,0 +1,47 @@
+tests/badparse.py:1 Unable to parse: could not parse string
+
+tests/class.py:20 Method x defined at line 28 in class A redefined
+tests/class.py:21 Class A has no attribute w
+tests/class.py:28 Method x is missing self parameter
+tests/class.py:38 Class A has no attribute w
+
+tests/global.py:3 Unknown identifier: y
+
+tests/import.py:1 Identifier (bar) not used
+tests/import.py:3 Identifier (nifty) not used
+tests/import.py:7 Import of "join" is duplicate of import in parent scope <ModuleScope: global>
+tests/import.py:9 Unknown identifier: __all__
+tests/import.py:13 Error trying to import xYzZy: No module named xYzZy
+tests/import.py:14 Unknown identifier: z
+tests/import.py:17 Identifier (getopt) not used
+tests/import.py:17 Import of "getopt" is duplicate in current scope
+tests/import.py:18 Import of "join" duplicates import from module posixpath at 4
+tests/import.py:18 Import of "split" duplicates import from module posixpath at 4
+
+tests/op.py:2 Operator (++) doesn't exist, statement has no effect
+tests/op.py:4 Scope (g) is redefined at line 7
+tests/op.py:5 Operator (+) normally has no effect
+tests/op.py:8 Operator (--) doesn't exist, statement has no effect
+
+tests/self.py:9 First argument to method f (x) is not in ['self', 'this', 's']
+tests/self.py:14 Identifier (a) not used
+
+tests/shadow.py:2 Scope (f) is redefined at line 8
+tests/shadow.py:4 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:15 Identifier (a) not used
+tests/shadow.py:15 Identifier (b) not used
+tests/shadow.py:15 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:16 Identifier (f) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:17 Identifier (a) not used
+tests/shadow.py:17 Identifier (a) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:17 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:18 Identifier (b) not used
+tests/shadow.py:18 Identifier (b) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:19 Unknown identifier: c
+tests/shadow.py:19 Unknown identifier: d
+tests/shadow.py:22 Identifier (a) shadows definition in scope <ModuleScope: global>
+
+tests/unused.py:6 Identifier (Test) not used
+
+tests/unusedImport.py:1 Identifier (sys) not used
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/options
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/options b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/options
new file mode 100644
index 0000000..26f9016
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/options
@@ -0,0 +1,33 @@
+Error: option -? not recognized
+Usage:
+ ./../pychecker2/main.py [options] [--] file1.py file2.py ...
+available options:
+
+Error:
+ --no-duplicateImport   Report/ignore duplicate imports
+ --no-hasAttribute      Report unknown object attributes in methods
+ --no-importError       Report/ignore imports that may fail
+ --no-main              Ignore module-level code protected by __name__ == "__main__"
+ --no-methodRedefined   Report the redefinition of class methods
+ --no-missingSelf       Report methods without "self"
+ --no-operator          Check for (++) and (--) which are legal, but not useful
+ --no-operatorPlus      Check for unary +
+ --no-redefinedScope    Report redefined scopes
+ --reportUnusedSelf     Ignore unused method "self" parameter
+ --no-selfName          Report any methods whose first argument is not self
+ --selfNames            Name of self parameter
+                        ['self', 'this', 's']
+ --shadowBuiltins       Report names that shadow builtins
+ --no-shadowIdentifier  Report names already defined in outer scopes
+ --no-shadowImport      Report imports which shadow names from other imports
+ --no-syntaxErrors      Report/ignore syntax errors
+ --no-unknown           Report names that are not defined
+ --no-unpackedUsed      Do not treat variables used in tuple assignment as used
+ --no-unused            Report names not used
+ --unusedPrefixes       Ignore unused identifiers that start with these values
+                        ['unused', 'empty', 'dummy', '__pychecker__', '__all__', '__version__', 'ignored']
+
+Miscellaneous:
+ --incremental          print warnings as they are created
+ --profile              print a profile of pychecker
+ --verbose              turn on verbose messages

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/reportUnusedSelf
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/reportUnusedSelf b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/reportUnusedSelf
new file mode 100644
index 0000000..2eb9d41
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/reportUnusedSelf
@@ -0,0 +1,55 @@
+tests/badparse.py:1 Unable to parse: could not parse string
+
+tests/class.py:20 Method x defined at line 28 in class A redefined
+tests/class.py:21 Class A has no attribute w
+tests/class.py:28 Method x is missing self parameter
+tests/class.py:38 Class A has no attribute w
+
+tests/global.py:3 Unknown identifier: y
+
+tests/import.py:1 Identifier (bar) not used
+tests/import.py:3 Identifier (nifty) not used
+tests/import.py:7 Import of "join" is duplicate of import in parent scope <ModuleScope: global>
+tests/import.py:9 Unknown identifier: __all__
+tests/import.py:13 Error trying to import xYzZy: No module named xYzZy
+tests/import.py:14 Unknown identifier: z
+tests/import.py:17 Identifier (getopt) not used
+tests/import.py:17 Import of "getopt" is duplicate in current scope
+tests/import.py:18 Import of "join" duplicates import from module posixpath at 4
+tests/import.py:18 Import of "split" duplicates import from module posixpath at 4
+
+tests/not_there.py:[unknown line] Unable to parse: [Errno 2] No such file or directory: 'tests/not_there.py'
+
+tests/op.py:2 Operator (++) doesn't exist, statement has no effect
+tests/op.py:4 Scope (g) is redefined at line 7
+tests/op.py:5 Operator (+) normally has no effect
+tests/op.py:8 Operator (--) doesn't exist, statement has no effect
+
+tests/self.py:4 Identifier (self) not used
+tests/self.py:9 First argument to method f (x) is not in ['self', 'this', 's']
+tests/self.py:9 Identifier (x) not used
+tests/self.py:14 First argument to method f (x) is not in ['self', 'this', 's']
+tests/self.py:14 Identifier (a) not used
+
+tests/shadow.py:2 Scope (f) is redefined at line 8
+tests/shadow.py:4 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:15 Identifier (a) not used
+tests/shadow.py:15 Identifier (b) not used
+tests/shadow.py:15 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:16 Identifier (f) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:17 Identifier (a) not used
+tests/shadow.py:17 Identifier (a) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:17 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:18 Identifier (b) not used
+tests/shadow.py:18 Identifier (b) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:19 Unknown identifier: c
+tests/shadow.py:19 Unknown identifier: d
+tests/shadow.py:22 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:28 Identifier (self) not used
+tests/shadow.py:32 Identifier (a) shadows definition in scope <ModuleScope: global>
+
+tests/unused.py:6 Identifier (Test) not used
+tests/unused.py:9 Identifier (self) not used
+
+tests/unusedImport.py:1 Identifier (sys) not used
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/shadowBuiltins
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/shadowBuiltins b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/shadowBuiltins
new file mode 100644
index 0000000..dd0cc0f
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/shadowBuiltins
@@ -0,0 +1,50 @@
+tests/badparse.py:1 Unable to parse: could not parse string
+
+tests/class.py:20 Method x defined at line 28 in class A redefined
+tests/class.py:21 Class A has no attribute w
+tests/class.py:28 Method x is missing self parameter
+tests/class.py:38 Class A has no attribute w
+
+tests/global.py:3 Unknown identifier: y
+
+tests/import.py:1 Identifier (bar) not used
+tests/import.py:3 Identifier (nifty) not used
+tests/import.py:7 Import of "join" is duplicate of import in parent scope <ModuleScope: global>
+tests/import.py:9 Unknown identifier: __all__
+tests/import.py:13 Error trying to import xYzZy: No module named xYzZy
+tests/import.py:14 Unknown identifier: z
+tests/import.py:17 Identifier (getopt) not used
+tests/import.py:17 Import of "getopt" is duplicate in current scope
+tests/import.py:18 Import of "join" duplicates import from module posixpath at 4
+tests/import.py:18 Import of "split" duplicates import from module posixpath at 4
+
+tests/not_there.py:[unknown line] Unable to parse: [Errno 2] No such file or directory: 'tests/not_there.py'
+
+tests/op.py:2 Operator (++) doesn't exist, statement has no effect
+tests/op.py:4 Scope (g) is redefined at line 7
+tests/op.py:5 Operator (+) normally has no effect
+tests/op.py:8 Operator (--) doesn't exist, statement has no effect
+
+tests/self.py:9 First argument to method f (x) is not in ['self', 'this', 's']
+tests/self.py:14 Identifier (a) not used
+
+tests/shadow.py:2 Scope (f) is redefined at line 8
+tests/shadow.py:4 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:13 Identifier (max) shadows builtin
+tests/shadow.py:15 Identifier (a) not used
+tests/shadow.py:15 Identifier (b) not used
+tests/shadow.py:15 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:16 Identifier (f) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:17 Identifier (a) not used
+tests/shadow.py:17 Identifier (a) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:17 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:18 Identifier (b) not used
+tests/shadow.py:18 Identifier (b) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:19 Unknown identifier: c
+tests/shadow.py:19 Unknown identifier: d
+tests/shadow.py:22 Identifier (a) shadows definition in scope <ModuleScope: global>
+
+tests/unused.py:6 Identifier (Test) not used
+
+tests/unusedImport.py:1 Identifier (sys) not used
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/verbose
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/verbose b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/verbose
new file mode 100644
index 0000000..253c7a8
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/expected/verbose
@@ -0,0 +1,69 @@
+Checking file tests/badparse.py
+
+Checking file tests/class.py
+
+Checking file tests/global.py
+
+Checking file tests/import.py
+
+Checking file tests/op.py
+
+Checking file tests/self.py
+
+Checking file tests/shadow.py
+
+Checking file tests/unusedImport.py
+
+Checking file tests/unused.py
+
+Checking file tests/not_there.py
+
+tests/badparse.py:1 Unable to parse: could not parse string
+
+tests/class.py:20 Method x defined at line 28 in class A redefined
+tests/class.py:21 Class A has no attribute w
+tests/class.py:28 Method x is missing self parameter
+tests/class.py:38 Class A has no attribute w
+
+tests/global.py:3 Unknown identifier: y
+
+tests/import.py:1 Identifier (bar) not used
+tests/import.py:3 Identifier (nifty) not used
+tests/import.py:7 Import of "join" is duplicate of import in parent scope <ModuleScope: global>
+tests/import.py:9 Unknown identifier: __all__
+tests/import.py:13 Error trying to import xYzZy: No module named xYzZy
+tests/import.py:14 Unknown identifier: z
+tests/import.py:17 Identifier (getopt) not used
+tests/import.py:17 Import of "getopt" is duplicate in current scope
+tests/import.py:18 Import of "join" duplicates import from module posixpath at 4
+tests/import.py:18 Import of "split" duplicates import from module posixpath at 4
+
+tests/not_there.py:[unknown line] Unable to parse: [Errno 2] No such file or directory: 'tests/not_there.py'
+
+tests/op.py:2 Operator (++) doesn't exist, statement has no effect
+tests/op.py:4 Scope (g) is redefined at line 7
+tests/op.py:5 Operator (+) normally has no effect
+tests/op.py:8 Operator (--) doesn't exist, statement has no effect
+
+tests/self.py:9 First argument to method f (x) is not in ['self', 'this', 's']
+tests/self.py:14 Identifier (a) not used
+
+tests/shadow.py:2 Scope (f) is redefined at line 8
+tests/shadow.py:4 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:15 Identifier (a) not used
+tests/shadow.py:15 Identifier (b) not used
+tests/shadow.py:15 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:16 Identifier (f) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:17 Identifier (a) not used
+tests/shadow.py:17 Identifier (a) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:17 Identifier (a) shadows definition in scope <ModuleScope: global>
+tests/shadow.py:18 Identifier (b) not used
+tests/shadow.py:18 Identifier (b) shadows definition in scope <FunctionScope: g>
+tests/shadow.py:19 Unknown identifier: c
+tests/shadow.py:19 Unknown identifier: d
+tests/shadow.py:22 Identifier (a) shadows definition in scope <ModuleScope: global>
+
+tests/unused.py:6 Identifier (Test) not used
+
+tests/unusedImport.py:1 Identifier (sys) not used
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/format.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/format.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/format.py
new file mode 100644
index 0000000..2290ea4
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/format.py
@@ -0,0 +1,48 @@
+
+def f1(x):
+    return '%s' % x
+
+def f2(x):
+    return ('%s' + '%s') % (x, x)
+
+def f3(x):
+    return (('%s' + '%s') * 8) % ((x,) * 16)
+
+def f4():
+    return '%(x)f %(y)s' % locals()
+
+def f5():
+    return '%' % locals()
+
+def f6():
+    return '%z this, too is a kookie format, yah' % locals()
+
+def f7():
+    return '%*.s %*.*s %*f' % locals()
+
+def f8():
+    return '%(mi)x %(it)s %up' % locals()
+
+def f9():
+    return '%s %d %f' % ('', 2)
+
+def f10():
+    return '%s %%' % ('',)
+
+def f11(t):
+    return '%s %f' % t
+
+def f12(t):
+    return '%s %lf' % (t, t)
+
+def f13(t):
+    return ('%s %f' + t) % (1, 2)
+
+def f14():
+    return '%up %(mi)x' % (1, 2)
+
+def f15():
+    return ('%s' * 6) % ((1, 2) + 3 * 7)
+
+def f16():
+    return '%(foo)*.*s' % {'foo': 'bar'}

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/global.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/global.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/global.py
new file mode 100644
index 0000000..cb54d59
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/global.py
@@ -0,0 +1,14 @@
+
+if __name__ == "__main__":
+    x = y
+
+debug = 1
+def _debug(msg):
+    if debug:
+        print msg
+
+def main():
+    import sys
+    global debug
+    debug = '-d' in sys.argv
+    _debug('debug is %d' % debug)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/import.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/import.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/import.py
new file mode 100644
index 0000000..6446b89
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/import.py
@@ -0,0 +1,19 @@
+from sys import path as foo, argv as bar# bar not used
+import getopt                           # getopt not used
+import os.path as nifty                 # nifty not used
+from os.path import *
+
+def f(v):
+    from os.path import join            # duplicate import
+    v.append(join(foo))                 # join from os.path
+    v.append(__all__)                   # __all__ is unknown
+
+x = 7
+if x == 100:
+    from xYzZy import *                 # not found
+    x = z
+
+not_used = 13
+import getopt                           # duplicate import
+from string import *                    # shadow 'join'
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/nested.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/nested.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/nested.py
new file mode 100644
index 0000000..fd854b8
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/nested.py
@@ -0,0 +1,8 @@
+
+class N1:
+    class N2:
+        x = 1
+        class N3:
+            pass
+
+        

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/op.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/op.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/op.py
new file mode 100644
index 0000000..1db2ec0
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/op.py
@@ -0,0 +1,24 @@
+def f(a):
+    return ++a
+
+def g(a):
+    return +a
+
+def g(a):
+    return --a
+
+def foo():
+    if 1 == None:
+        print "whoa!"
+    else:
+        print "whew!"
+
+    if None == 1:
+        print "whoa!"
+    else:
+        print "whew!"
+
+def bar():
+    a = b = 0
+    if 'a' <= b >= 'c':
+        print ""

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/self.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/self.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/self.py
new file mode 100644
index 0000000..8c7fc7c
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/self.py
@@ -0,0 +1,31 @@
+
+class SelfTester:
+
+    def f(self, a):
+        return a
+
+class SelfTester2:
+
+    def f(x, a):
+        return a
+
+class SelfTester3:
+
+    def f(x, a):
+        return x, a
+
+class SelfTester4:
+
+    def f(self = 1):
+        return self
+
+class SelfTester5:
+
+    def f(self = 1, *args, **kwargs):
+        return self, args, kwargs
+
+def f(self):
+    print self
+
+x = lambda self: self
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/shadow.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/shadow.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/shadow.py
new file mode 100644
index 0000000..e78cff5
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/shadow.py
@@ -0,0 +1,59 @@
+
+def f(a, b):
+    a = b
+    for a in range(10):
+        b += a
+    return b
+
+def f(a, b):
+    return a + b
+
+f = 3
+
+max = 3
+
+def g(a, b):
+    def f(c, d):
+        a = c
+        b = d + max
+    return f(c, d)
+
+class C:
+    f = lambda a, b: a + b
+    def f(self, b):
+        pass
+
+class D:
+    CONSTANT = 1
+    def h(self, arg):
+        CONSTANT = D.CONSTANT
+        arg.append(CONSTANT)
+
+def xyzzy(a, max=max, *args, **kw):
+    print a, args, kw
+    return max
+
+if __name__ == '__main__':
+    a = 2
+if '__main__' == __name__:
+    a = 2
+
+if x:
+    def f1():
+        print x
+else:
+    def f1():
+        print x
+
+try:
+    def f2():
+        print x
+except AttributeError:
+    def f2():
+        print x
+except:
+    def f2():
+        print x
+else:
+    def f2():                           # should still warn
+        print x

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/unreachable.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/unreachable.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/unreachable.py
new file mode 100644
index 0000000..11e2f5c
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/unreachable.py
@@ -0,0 +1,58 @@
+v1=0
+
+def f1():
+    if v1:
+        v2 = 2 + 3 * 4 / 7 << 3;
+        return v2
+    elif v2:
+        a, b = 1, 2
+        b, a = a, b
+        return 0
+    else:
+        print 7
+        return 1
+    return 0                            # unreachable
+
+def f2():
+    if v1:
+        return 0
+    return 0
+
+def f3():
+    if v1:
+        raise v1
+    else:
+        raise v1
+    print v1                            # unreachable
+
+def f4():
+    assert None
+    print v1                            # unreachable
+
+def f5():
+    assert 1
+    print v1
+    
+def f6():
+    assert 0
+    print v1                            # unreachable
+
+
+def f7():
+    global v1
+    try:
+        assert None
+    except KeyError:
+        v1 = 7
+    else:
+        raise v1                        # unreachable
+    return 0
+
+def f8():
+    try:
+        print v1()
+    except KeyError:
+        return 7
+    else:
+        raise v1
+    return 0                            # unreachable

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/unused.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/unused.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/unused.py
new file mode 100644
index 0000000..9edc124
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/unused.py
@@ -0,0 +1,31 @@
+
+def f(a):
+    return 1
+
+def g():
+    class Test:
+        def q(self):
+            class TestInner:
+                def p(self, a):
+                    return a
+            self.foo = TestInner()
+            
+                    
+x, y = 1, 2
+class Object: pass
+x = Object()
+x.y, x.z = 1, 2
+
+def h(a, b, c):
+    assert 0, "should not be called"
+
+[x1, y1, z1] = [1, 2, 3]
+[x1, y1, z1] = [y1, z1, x1]
+
+def xyzzy():
+    global x
+    global y
+    y = 1
+
+def XyZZy(a, (b, (c, d)), e):
+    return a + e

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/unusedImport.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/unusedImport.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/unusedImport.py
new file mode 100644
index 0000000..5c98a10
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/unusedImport.py
@@ -0,0 +1,4 @@
+import sys
+
+def f(x):
+    return f(x)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/__init__.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/__init__.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/__init__.py
new file mode 100644
index 0000000..e16c76d
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/__init__.py
@@ -0,0 +1 @@
+""

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/class.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/class.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/class.py
new file mode 100644
index 0000000..44efdb4
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/class.py
@@ -0,0 +1,232 @@
+from pychecker2.TestSupport import WarningTester
+from pychecker2 import ClassChecks
+
+class ClassTestCase(WarningTester):
+    def testClassChecks(self):
+        self.silent('class A:\n'
+                    '  def f(self):\n'
+                    '    return 0\n'
+                    'class B(A):\n'
+                    '  def g(self):\n'
+                    '    return self.f\n')
+    def testSignature(self):
+        w = ClassChecks.AttributeCheck.signatureChanged
+        self.silent('class Base:\n'
+                    '  def f(self): pass\n'
+                    'class Derived(Base):\n'
+                    '  def f(self): pass\n')
+        self.warning('class Base:\n'
+                     '  def f(self): pass\n'
+                     'class Derived(Base):\n'
+                     '  def f(self, x): pass\n',
+                     4, w, 'f', 'Base')
+        self.silent('class Base:\n'
+                    '  def f(self, x, y, *args): pass\n'
+                    'class Derived(Base):\n'
+                    '  def f(self, x, *args): pass\n')
+        self.warning('class Base:\n'
+                     '  def f(self, x, *args): pass\n'
+                     'class Derived(Base):\n'
+                     '  def f(self, x, y, *args): pass\n',
+                     4, w, 'f', 'Base')
+        self.silent('class Base:\n'
+                    '  def __private(self, x, y): pass\n'
+                    'class Derived(Base):\n'
+                    '  def __private(self, x): pass\n')
+        self.warning('class Base:\n'
+                     '  def __private(self, x, y): pass\n'
+                     'class Derived(Base):\n'
+                     '  def _Base__private(self, x): pass\n',
+                     4, w, '__private', 'Base')
+
+    def testUnknownAttribute(self):
+        w = ClassChecks.AttributeCheck.unknownAttribute
+        self.warning('class C:\n'
+                     '  def f(self): return self.x\n', 2, w, 'C', 'x')
+        self.silent('class C:\n'
+                    '  def f(self): return self.x\n'
+                    '  def __init__(self, v): self.x = v\n')
+        self.silent('class D:\n'
+                    '  def __init__(self): self.x = 1\n'
+                    'class C(D):\n'
+                    '  def f(self): return self.x\n')
+        self.silent('from pychecker2.utest.data import *\n'
+                    'class C(Data):\n'
+                    '  def get_value2(self):\n'
+                    '    return self.get_value()\n'
+                    '\n')
+        imp = '\n\nimport'
+        frm = '\n\nfrom'
+        import_abuse = [
+            (imp, 'pychecker2.utest.data', 'pychecker2.utest.data.Data'),
+            (imp, 'pychecker2.utest.data as F',             'F.Data'),
+            (frm, 'pychecker2.utest import data',           'data.Data'),
+            (frm, 'pychecker2.utest import data as F',      'F.Data'),
+            (frm, 'pychecker2.utest.data import Data',      'Data'),
+            (frm, 'pychecker2.utest.data import Data as F', 'F'),
+            (frm, 'pychecker2.utest.data import *',         'Data'),
+            ('class A:\n  class B:\n    import pychecker2.utest.data',
+             '',
+             'A.B.pychecker2.utest.data.Data'),
+            ('class A:\n'
+             '  class B:\n'
+             '    from pychecker2.utest import data as F',
+             '',
+             'A.B.F.Data')
+            ]
+        for fmt in import_abuse:
+            self.silent('%s %s\n'
+                        'class C(%s):\n'
+                        '  def f(self): return self.value\n' % fmt)
+            self.silent('%s %s\n'
+                        'def g(v):\n'
+                        '  class C(%s):\n'
+                        '    def f(self): return self.value\n'
+                        '  return C(v)\n' % fmt)
+            self.warning('%s %s\n'
+                         'class C(%s):\n'
+                         '  def f(self): self.get_value = 1\n' % fmt,
+                         5, ClassChecks.AttributeCheck.methodRedefined,
+                         'get_value', 'C')
+
+            self.warning('%s %s\n'
+                         'def g(v):\n'
+                         '  class C(%s):\n'
+                         '    def f(self): self.get_value = 1\n'
+                         '  return C(v)\n' % fmt,
+                         6, ClassChecks.AttributeCheck.methodRedefined,
+                         'get_value', 'C')
+
+            self.warning('%s %s\n'
+                         'class C(%s):\n'
+                         '  def get_value(self, x): pass\n' % fmt,
+                         5, ClassChecks.AttributeCheck.signatureChanged,
+                         'get_value', 'Data')
+
+    def testSpecial(self):
+        for fmt in [('__del__', 'self, args', 1),
+                    ('__cmp__', 'self', 2),
+                    ]:
+            self.warning('class C:\n'
+                         '  def %s(%s):\n'
+                         '     pass\n' % fmt[0:2],
+                         2, ClassChecks.SpecialCheck.specialMethod,
+                         fmt[0], fmt[2], fmt[2] > 1 and "s" or "")
+        for fmt in [('__del__', 'self'),
+                    ('__ge__', 'self, a, b = None, c = None'),
+                    ]:
+            self.silent('class C:\n'
+                         '  def %s(%s):\n'
+                         '     pass\n' % fmt)
+        self.warning('class C:\n'
+                     '  def __not_special__(self):\n'
+                     '     pass\n',
+                     2, ClassChecks.SpecialCheck.notSpecial,
+                     '__not_special__')
+
+    def testUncheckableAttribute(self):
+        # inherit from local variable
+        self.silent('def f(klass):\n'
+                    '  class C(klass):\n'
+                    '      def __init__(self, x):\n'
+                    '          self.foo = x\n'
+                    '      def g(self): return self.foo\n'
+                    '  return C(1)\n')
+        # inherit from an expression
+        self.silent('class A:\n'
+                    '  def __add__(self, unused):\n'
+                    '     return A\n'
+                    'class B(A): pass\n'
+                    'class C(A() + B()): pass\n')
+        # inherit from something not in a source module
+        self.warning('import exceptions\n'
+                     'class C(exceptions):\n'
+                     '  def f(self):\n'
+                     '    return self.value\n',
+                     4, ClassChecks.AttributeCheck.unknownAttribute,
+                     'C', 'value')
+        self.warning('import pychecker2.utest.data\n'
+                     'class C(pychecker2.utest.data.exceptions.AssertionError):\n'
+                     '  def f(self):\n'
+                     '    return self.value\n',
+                     4, ClassChecks.AttributeCheck.unknownAttribute,
+                     'C', 'value')
+        self.warning('from pychecker2.utest.data import Data as F\n'
+                     'class C(F.DataError):\n'
+                     '  def f(self):\n'
+                     '    return self.value\n',
+                     4, ClassChecks.AttributeCheck.unknownAttribute,
+                     'C', 'value')
+        self.silent('def f():\n'
+                    '   class Foo(None.__class__): pass\n'
+                    '   return Foo()\n')
+
+    def testUnused(self):
+        self.warning('class C:\n'
+                     '  def __init__(self):\n'
+                     '    self.__x = 1\n',
+                     3, ClassChecks.AttributeCheck.unusedAttribute, '__x', 'C')
+        self.warning('class C:\n'
+                     '  def __init__(self):\n'
+                     '    class D:\n'
+                     '       def __init__(self): self.__x = 1\n'
+                     '       def f(self):\n'
+                     '          return self.__x\n'
+                     '    self.__x = D()\n',
+                     7, ClassChecks.AttributeCheck.unusedAttribute, '__x', 'C')
+        self.silent('class C:\n'
+                     '  def __init__(self):\n'
+                     '    self.x = 1\n')
+
+    def testInit(self):
+        w = ClassChecks.InitCheck.initReturnsValue
+        self.warning('class C:\n'
+                     '  def __init__(self):\n'
+                     '    return 1\n', 3, w)
+        self.warning('class C:\n'
+                     '  def __init__(self):\n'
+                     '    def f(x):\n'
+                     '        return f(x - 1)\n'
+                     '    return f(1)\n', 5, w)
+
+        w = ClassChecks.AttributeCheck.attributeInitialized
+        self.silent('class C:\n'
+                    '  def f(self):\n'
+                    '    self.value = 1\n'
+                    '  def __init__(self):\n'
+                    '    self.value = None\n')
+        self.warning('class C:\n'
+                     '  def __init__(self): pass\n'
+                     '  def f(self):\n'
+                     '    self.value = 1',
+                     4, w, 'value')
+
+    def testRepr(self):
+        w = ClassChecks.ReprCheck.backquoteSelf
+        self.silent('class C:\n'
+                    '  def __str__(self):\n'
+                    '    return "C" + `self`\n')
+        self.warning('class C:\n'
+                    '  def __repr__(self):\n'
+                    '    return "C" + `self`\n', 3, w)
+
+    def testMethodRedefined(self):
+        w = ClassChecks.AttributeCheck.methodRedefined
+
+        self.warning('class C:\n'
+                     '  def f(self):\n'
+                     '     self.f = lambda x: x\n',
+                     3, w, 'f', 'C')
+        self.warning('class B:\n'
+                     '  def g(self): pass\n'
+                     'class C(B):\n'
+                     '  def f(self):\n'
+                     '     self.g = lambda x: x\n',
+                     5, w, 'g', 'C')
+        self.warning('from pychecker2.utest.data import Data\n'
+                     'class C(Data):\n'
+                     '  def f(self):\n'
+                     '    self.get_value = 1\n',
+                     4, w, 'get_value','C')
+
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/conditional.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/conditional.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/conditional.py
new file mode 100644
index 0000000..2c7250e
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/conditional.py
@@ -0,0 +1,27 @@
+from pychecker2.TestSupport import WarningTester
+from pychecker2 import ConditionalChecks
+
+class ConditionalTestCase(WarningTester):
+    def testConstants(self):
+        w = ConditionalChecks.ConstantCheck.constantInConditional
+        
+        self.silent('a, b = 1, 2\n'
+                    'if a < b:\n'
+                    '   print a\n')
+        self.warning('a = 1\n'
+                     'if a or 1:\n'
+                     '  print a\n', 2, w, '1')
+        self.warning('a = 1\n'
+                     'if not 1:\n'
+                     '  print a\n', 2, w, '1')
+        self.silent('a, b = 1, 2\n'
+                    'if a < 1 + 7:\n'
+                    '   print a\n')
+        self.warning('result = [x for x in [1, 2, 3] if x or 1]\n',
+                     1, w, '1')
+        self.warning('result = [x for x in [1, 2, 3] if x or None]\n',
+                     1, w, 'None')
+        self.warning('x = 1\n'
+                     'while x or None:\n'
+                     '   x = x + 1\n',
+                     2, w, 'None')

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/data.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/data.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/data.py
new file mode 100644
index 0000000..b0b903a
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/data.py
@@ -0,0 +1,8 @@
+import exceptions
+
+class Data:
+    class DataError(exceptions.ValueError): pass
+    def __init__(self, value):
+        self.value = value
+    def get_value(self):
+        return self.value

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/format.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/format.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/format.py
new file mode 100644
index 0000000..7b561a1
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/format.py
@@ -0,0 +1,78 @@
+from pychecker2 import TestSupport
+from pychecker2 import FormatStringChecks
+
+class FormatTestCase(TestSupport.WarningTester):
+
+    def testGoodFormats(self):
+        self.silent('def f(x):\n'
+                    '    return "%s" % x\n')
+        self.silent('def f(x):\n'
+                    "    return ('%s' + '%s') % (x, x)\n")
+        self.silent("def f(x):\n"
+                    "   return (('%s' + '%s') * 8) % ((x,) * 16)\n")
+        self.silent("def f(x):\n"
+                    "   y = 2\n"
+                    "   return '%(x)f %(y)s' % locals()\n")
+        self.silent("y = 1\n"
+                    "def f():\n"
+                    "   return '%(y)s' % globals()\n")
+        self.silent("def f():\n"
+                     "  return '%*.s %*.*s %*f' % locals()\n")
+        self.silent("def f():\n"
+                    "   return '%s %%' % ('',)\n")
+        self.silent("def f(t):\n"
+                    "    return '%s %f' % t\n")
+        self.silent("def f(t):\n"
+                    "    return ('%s %f' + t) % (1, 2)\n")
+        self.silent("def f(t):\n"
+                    "    return '%s' % `t`\n")
+        self.silent("def f(t):\n"
+                    "    return '%s' * ((7 - 1) / 2) % (t,t,t)\n")
+
+    def testBadFormats(self):
+        w = FormatStringChecks.FormatStringCheck.badFormat
+        self.warning("def f():\n"
+                     "    return '%' % locals()\n", 2, w, 0, '%')
+        self.warning("def f():\n"
+                     "  return '%z a kookie format, yah' % locals()\n",
+                     2, w, 0, '%z a kooki...')
+        self.warning("def f():\n"
+                     "    return '%(foo)*.*s' % {'foo': 'bar'}\n",
+                     2, w, 0, '%(foo)*.*s')
+
+    def testMixed(self):
+        w = FormatStringChecks.FormatStringCheck.mixedFormat
+        self.warning("def f():\n"
+                     "  return '%(mi)x %up' % locals()\n", 2, w, '(mi)')
+        self.warning("def f():\n"
+                     "    return '%up %(mi)x' % (1, 2)\n", 2, w, '(mi)')
+
+    def testFormatCount(self):
+        w = FormatStringChecks.FormatStringCheck.formatCount
+        self.warning("def f():\n"
+                     "    return '%s %d %f' % ('', 2)\n",
+                     2, w, 2, 3)
+
+    def testUselessModifier(self):
+        w = FormatStringChecks.FormatStringCheck.uselessModifier
+        self.warning("def f(t):\n"
+                     "    return '%s %lf' % (t, t)\n",
+                     2, w, 'l')
+
+    def testFormatConstants(self):
+        w = FormatStringChecks.FormatStringCheck.badConstant
+        self.warning("def f():\n"
+                    "    return ('%s' * 6) % ((1, 2) + 3 * 7)\n",
+                     2, w, 'can only concatenate tuple (not "int") to tuple')
+        self.warning("def f():\n"
+                    "    return ('%s' + 6) % ((1, 2) * 3)\n",
+                     2, w, "cannot concatenate 'str' and 'int' objects")
+
+    def testUnknownName(self):
+        w = FormatStringChecks.FormatStringCheck.unknownFormatName
+        self.warning("def f():\n"
+                     "   return '%(unknown)s' % globals()\n",
+                     2, w, "unknown", "globals")
+        self.warning("def f():\n"
+                     "   return '%(unknown)s' % locals()\n",
+                     2, w, "unknown", "locals")

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/import.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/import.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/import.py
new file mode 100644
index 0000000..0334649
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/import.py
@@ -0,0 +1,33 @@
+from pychecker2.TestSupport import WarningTester
+from pychecker2 import ImportChecks
+
+class ImportTestCase(WarningTester):
+    def testImportChecks(self):
+        self.silent('import sys; print sys.argv')
+        self.silent('import pychecker2; print pychecker2')
+        self.silent('import pychecker2.utest; print pychecker2.utest')
+
+    def testImportChecks(self):
+        self.warning('import sys\n'
+                     'print sys.argv\n'
+                     'import sys\n',
+                     3, ImportChecks.ImportCheck.duplicateImport,
+                     'sys', ' in current scope')
+        self.warning('from sys import *\n'
+                     'def f():\n'
+                     '  def g():\n'
+                     '    from sys import argv\n'
+                     '    return argv\n'
+                     '  return g() + g()\n'
+                     'print argv\n',
+                     4, ImportChecks.ImportCheck.duplicateImport, 'argv',
+                     ' of import in parent scope <ModuleScope: global>')
+        self.warning('import no_such_module\n',
+                     1, ImportChecks.ImportCheck.importError, 'no_such_module',
+                     'No module named no_such_module')
+        self.warning('from pychecker2.utest.data import *\n'
+                     'import exceptions\n'
+                     'print exceptions\n',
+                     2, ImportChecks.ImportCheck.shadowImport,
+                     'exceptions', 'pychecker2.utest.data', 1)
+                     

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/ops.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/ops.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/ops.py
new file mode 100644
index 0000000..79bbfd0
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/ops.py
@@ -0,0 +1,43 @@
+from pychecker2 import TestSupport
+from pychecker2 import OpChecks
+
+class OpTests(TestSupport.WarningTester):
+    def testOperator(self):
+        for op in ['--', '++']:
+            self.warning('def f(x):\n'
+                         '   return %sx' % op,
+                         2, OpChecks.OpCheck.operator, op)
+            
+    def testOperatorPlus(self):
+        self.warning('def f(x):\n'
+                     '   return +x', 2, OpChecks.OpCheck.operatorPlus)
+
+    def testEqualNone(self):
+        self.silent('def f(x):\n'
+                     '   return 1 <= x <= None\n')
+        self.warning('def f(x):\n'
+                     '   return x == None\n', 2, OpChecks.CompareCheck.useIs)
+        self.warning('def f(x):\n'
+                     '   return 1 == x == None\n', 2, OpChecks.CompareCheck.useIs)
+        self.warning('def f(x):\n'
+                     '   return None == x == 1\n', 2, OpChecks.CompareCheck.useIs)
+        self.warning('def f(x):\n'
+                     '   return None == x\n', 2, OpChecks.CompareCheck.useIs)
+
+    def testExcept(self):
+        self.warning('try:\n'
+                     '   pass\n'
+                     'except:\n'
+                     '   pass\n', 4, OpChecks.ExceptCheck.emptyExcept)
+        self.warning('try:\n'
+                     '   pass\n'
+                     'except AssertionError:\n'\
+                     '   pass\n'
+                     'except:\n'
+                     '   pass\n', 6, OpChecks.ExceptCheck.emptyExcept)
+        self.warning('try:\n'
+                     '   pass\n'
+                     'except:\n'
+                     '   pass\n'
+                     'except AssertionError:\n'\
+                     '   pass\n', 4, OpChecks.ExceptCheck.emptyExcept)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/parseerror.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/parseerror.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/parseerror.py
new file mode 100644
index 0000000..877cbf9
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/parseerror.py
@@ -0,0 +1,24 @@
+from pychecker2 import TestSupport
+from pychecker2 import ParseChecks
+from pychecker2 import VariableChecks
+from pychecker2.File import File
+
+class UnknownTestCase(TestSupport.WarningTester):
+    def testParseError(self):
+        self.warning('===\n', 1, ParseChecks.ParseCheck.syntaxErrors,
+                     'could not parse string')
+        f = File('no-such-file')
+        self.checklist.check_file(f)
+        self.warning_file(f, 0, ParseChecks.ParseCheck.syntaxErrors,
+                          "No such file or directory")
+
+        self.warning('if __name__=="__main__":\n'
+                     '  _x = 1\n',
+                     2, VariableChecks.UnusedCheck.unused, '_x')
+        self.argv = ['--no-main']
+        self.silent('NoMoreGood = 1\n'
+                    'assert NoMoreGood\n')
+        self.silent('if __name__=="__main__":\n'
+                     '  _x = 1\n')
+        self.silent('if "__main__"==__name__:\n'
+                     '  _x = 1\n')

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/reachable.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/reachable.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/reachable.py
new file mode 100644
index 0000000..d04691d
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/reachable.py
@@ -0,0 +1,73 @@
+from pychecker2.TestSupport import WarningTester
+from pychecker2 import ReachableChecks
+
+class ReachableTestCase(WarningTester):
+    def testUnreachable(self):
+        w = ReachableChecks.ReachableCheck.unreachable
+        self.warning('v1, v2 = 0, 0\n'
+                     'def f():\n'
+                     '  if v1:\n'
+                     '     return v2\n'
+                     '  elif v2:\n'
+                     '    return 1\n'
+                     '  else:\n'
+                     '    return 0\n'
+                     '  return 1\n', 9, w)
+        self.warning('v1, v2 = 0, 0\n'
+                     'def f():\n'
+                     '  if v1:\n'
+                     '    raise AssertionError("assertion")\n'
+                     '  elif v2:\n'
+                     '    assert 0, "Another error"\n'
+                     '  else:\n'
+                     '    return 0\n'
+                     '  return f()\n', 9, w)
+        self.silent('def f(x):\n'
+                    '   while x:\n'
+                    '      pass\n')
+        self.silent('def f(x):\n'
+                    '   for i in x:\n'
+                    '      assert i\n')
+        self.silent('def f(x):\n'
+                    '  if x:\n'
+                    '    return 0\n'
+                    '  return 0\n')
+        self.warning('def f(x):\n'
+                     '  try:\n'
+                     '    x = 1 / x\n'
+                     '    return x\n'
+                     '  except Exception:\n'
+                     '    return 0\n'
+                     '  else:\n'
+                     '    x = 7\n'
+                     '  return x\n', 8, w)
+
+        self.silent('def f(v1, v2):\n'
+                    '  if v1:\n'
+                    '    return v2\n'
+                    '  elif v2:\n'
+                    '    v1 = v2\n'
+                    '  else:\n'
+                    '    assert 0, "Another error"\n'
+                    '  return f()\n')
+
+        self.silent('def f(v1, v2):\n'
+                    '  if v1:\n'
+                    '    return v2\n'
+                    '  elif v2:\n'
+                    '    v1 = v2\n'
+                    '  else:\n'
+                    '    assert 0, "Another error"\n'
+                    '  return 0\n')
+
+        self.silent('def f(x):\n'
+                    '  try:\n'
+                    '    return 1.0 / x\n'
+                    '  except ZeroDivisionError:\n'
+                    '    raise\n')
+    
+    def testImplicitReturn(self):
+        w = ReachableChecks.ReachableCheck.implicitReturn
+        self.warning('def f(v1, v2):\n'
+                     '  if v1:\n'
+                     '    return v2\n', 2, w, 'f')

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/returns.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/returns.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/returns.py
new file mode 100644
index 0000000..2a0ecc3
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/returns.py
@@ -0,0 +1,21 @@
+from pychecker2.TestSupport import WarningTester
+from pychecker2 import ReturnChecks
+
+class ReturnTestCase(WarningTester):
+    def testReturnChecks(self):
+        w = ReturnChecks.MixedReturnCheck.mixedReturns
+        self.silent('def f(): return\n')
+        self.silent('def f(): return 1\n')
+        self.silent('def f(x):\n'
+                     '  if x:\n'
+                     '    return 0\n'
+                     '  return 1\n')
+        self.warning('def f(x):\n'
+                     '  if x:\n'
+                     '    return\n'
+                     '  return 1\n', 3, w, 'f')
+        self.silent('def f(x):\n'
+                    '  def g():\n'
+                    '    return\n'
+                    '  return x + g()\n')
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/scopes.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/scopes.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/scopes.py
new file mode 100644
index 0000000..7553bf9
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/scopes.py
@@ -0,0 +1,47 @@
+from pychecker2.TestSupport import WarningTester
+from pychecker2 import ScopeChecks
+
+class RedefinedTestCase(WarningTester):
+    def testScopes(self):
+        w = ScopeChecks.RedefineCheck.redefinedScope
+        self.warning('def f(): pass\n'
+                     'def f(): pass\n',
+                     1, w, 'f', 2)
+        self.warning('class C:\n'
+                     '  def g(self): pass\n'
+                     '  def g(self): pass\n',
+                     2, w, 'g', 3)
+        self.silent('def s(): pass\n'
+                    'def f(): pass\n')
+        self.silent('import sys\n'
+                    'if sys.argv:\n'
+                    '   def f(): return 1\n'
+                    'else:\n'
+                    '   def f(): return 0\n')
+        self.warning('import sys\n'
+                     'if sys.argv:\n'
+                     '   def f(): return 1\n'
+                     '   def f(): return 0\n',
+                     3, w, 'f', 4)
+        self.warning('try:\n'
+                     '   def f(): return 1\n'
+                     'except Exception:\n'
+                     '   pass\n'
+                     'else:\n'
+                     '   def f(): return 0\n',
+                     2, w, 'f', 6)
+        self.warning('try:\n'
+                     '   def f(): return 1\n'
+                     '   def f(): return 0\n'
+                     'except Exception:\n'
+                     '   pass\n'
+                     'else:\n'
+                     '   pass\n',
+                     2, w, 'f', 3)
+
+        self.silent('try:\n'
+                    '   def f(): return 1\n'
+                    'except Exception:\n'
+                    '   def f(): return 0\n'
+                    'else:\n'
+                    '   pass\n')

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/self.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/self.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/self.py
new file mode 100644
index 0000000..f141830
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/self.py
@@ -0,0 +1,45 @@
+from pychecker2 import TestSupport
+from pychecker2 import VariableChecks
+
+class SelfTestCase(TestSupport.WarningTester):
+    def testSelf(self):
+        self.warning('class C:\n'
+                     '  def f(x): return x\n',
+                     2, VariableChecks.SelfCheck.selfName,
+                     'f', 'x', "['self', 'this', 's']")
+
+    def testSelfNames(self):
+        self.silent('class C:\n'
+                    '  def f(self): return self\n')
+        self.argv = ["--selfNames=['x']"]
+        self.warning('class C:\n'
+                     '  def f(self): return self\n',
+                     2, VariableChecks.SelfCheck.selfName,
+                     'f', 'self', "['x']")
+
+    def testSelfDefault(self):
+        w = VariableChecks.SelfCheck.selfDefault
+        self.warning('class C:\n'
+                     '  def f(s=None): return s\n', 2, w, 'f', 's')
+        self.warning('class C:\n'
+                     '  def f(s=None, **kw): return s, kw\n', 2, w, 'f', 's')
+        self.warning('class C:\n'
+                     '  def f(s=None, *args): return s, args\n',
+                     2, w, 'f', 's')
+        self.warning('class C:\n'
+                     '  def f(s=None, *args, **kw): return s, args, kw\n',
+                     2, w, 'f', 's')
+        
+    def testFunctionSelf(self):
+        w = VariableChecks.SelfCheck.functionSelf
+        self.warning('def f(a, self, b): return a + self + b\n',
+                     1, w, 'f', 'self')
+        self.argv = ["--selfSuspicious=['a']"]
+        self.warning('def f(a, self, b): return a + self + b\n',
+                     1, w, 'f', 'a')
+
+    def testMissingSelf(self):
+        w = VariableChecks.SelfCheck.missingSelf
+        self.warning('class C:\n'
+                     '  def f(): pass\n', 2, w, 'f')
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/shadow.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/shadow.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/shadow.py
new file mode 100644
index 0000000..b51ca43
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/shadow.py
@@ -0,0 +1,21 @@
+from pychecker2 import TestSupport
+from pychecker2 import VariableChecks
+
+class ShadowTestCase(TestSupport.WarningTester):
+    def testShadow(self):
+        "Test variable shadowing"
+        self.warning('a = 1\n'
+                     'def f(x):\n'
+                     '  a = x\n'
+                     '  return x + a\n',
+                     3, VariableChecks.ShadowCheck.shadowIdentifier,
+                     'a', '<ModuleScope: global>')
+        self.warning('file = None\n',
+                     1, VariableChecks.ShadowCheck.shadowBuiltins, 'file')
+
+        w = VariableChecks.ShadowCheck.defineNone
+        self.silent('none, x = 1, 2')
+        self.warning('None = None', 1, w)
+        self.warning('def None(x, y): pass', 1, w)
+        self.warning('None, x = 1, 2', 1, w)
+        self.warning('class None: pass', 1, w)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/unknown.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/unknown.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/unknown.py
new file mode 100644
index 0000000..cc394d8
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/unknown.py
@@ -0,0 +1,27 @@
+from pychecker2 import TestSupport
+from pychecker2 import VariableChecks
+
+class UnknownTestCase(TestSupport.WarningTester):
+    def testUnknown(self):
+        self.warning('def f(): print a\n',
+                     1, VariableChecks.UnknownCheck.unknown, 'a')
+        self.silent('def f():\n'
+                    '   a = 1\n'
+                    '   def g():\n'
+                    '      print a\n'
+                    '   print g()\n')
+        self.warning('def f():\n'
+                     '  def g():\n'
+                     '    print a\n'
+                     '  print g()\n',
+                     3, VariableChecks.UnknownCheck.unknown, 'a')
+        self.silent('from sys import *\n'
+                    'def f():\n'
+                    '    print argv\n')
+        self.silent('import sys\n'
+                    'def f():\n'
+                    '  def g():\n'
+                    '    print g, sys\n')
+        self.silent('def f():\n'
+                    '  for a, b in [(1,2)]:\n'
+                    '    print a, b\n')

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/unused.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/unused.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/unused.py
new file mode 100644
index 0000000..d488746
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/unused.py
@@ -0,0 +1,96 @@
+from pychecker2.TestSupport import WarningTester
+from pychecker2 import VariableChecks
+
+class UnusedTestCase(WarningTester):
+    def testUnusedBasic(self):
+        self.warning('def f(i, j): return i * 2\n',
+                     1, VariableChecks.UnusedCheck.unused, 'j')
+        self.warning('def _unused(): pass\n',
+                     1, VariableChecks.UnusedCheck.unused, '_unused')
+        self.silent('def f(x):\n'
+                    '  def g():\n'
+                    '     x.y.z, = 1\n'
+                    '  g()\n')
+
+    def testUnusedAbstract(self):
+        self.silent('def f(i): assert 0\n')
+        self.silent('def f(i): assert None\n')
+        self.silent('def f(i): return\n')
+        self.silent('def f(i): return 7\n')
+        self.silent('def f(i): pass\n')
+        self.silent('def f(i): raise NotImplementedError\n')
+
+    def testUnusedScopeNotSelf(self):
+        self.silent('class A:\n'
+                    '  def f(self, j): return j * 2\n')
+        self.argv = ['--reportUnusedSelf']
+        self.warning('class A:\n'
+                     '  def f(self, j): return j * 2\n',
+                     2, VariableChecks.UnusedCheck.unused, 'self')
+
+    def testUnusedScope(self):
+        self.warning('class A:\n'
+                     '  def f(self, j): return self\n', 2,
+                     VariableChecks.UnusedCheck.unused, 'j')
+        self.silent('def f(a, b):\n'
+                    '  def g(x):\n'
+                    '     return x * a\n'
+                    '  return g(b)\n')
+
+    def testUnusedIgnore(self):
+        self.warning('def f(a, xyzzySilly): return a\n',
+                     1, VariableChecks.UnusedCheck.unused, 'xyzzySilly')
+        self.argv = ['--unusedPrefixes=["xyzzy"]']
+        self.silent('def f(a, xyzzySilly): return a\n')
+                    
+
+    def testGlobal(self):
+        self.silent('x = 1\ndef f(x=x): return 7\n')
+        self.silent('def f(x):\n'
+                    '  global _y\n'
+                    '  _y = x\n'
+                    'def g(x): return x + _y\n')
+
+    def testUnpack(self):
+        w = VariableChecks.UnusedCheck.unused
+        self.silent('_x, _y = 1, 2\n')
+        self.silent('def f(a, (b, c)): print a, b\n')
+        self.silent('def f(a, (b, (c, d))): print a, b\n')
+        
+        self.argv = ['--no-unpackedUsed']
+        self.warning('_x, _y = 1, 2\n'
+                     'print _x\n', 1, w, '_y')
+        self.warning('def f(a, (b, c)): print a, b\n', 1, w, 'c')
+        self.silent('def f(a):\n'
+                    '   "this is an empty function"\n')
+
+    def testUsedBeforeSet(self):
+        w = VariableChecks.UsedBeforeSetCheck.usedBeforeDefined
+        self.warning('G1 = 1\n'
+                     'def f(L1, (L2, L3)):\n'
+                     '  x = 1\n'
+                     '  if G1:\n'
+                     '    y = 2\n'
+                     '  if G1:\n'
+                     '    z = 1\n'
+                     '    y = 2\n'
+                     '  else:\n'
+                     '    z = 2\n'
+                     '  return L1, L2, L3, x, y, z\n',
+                     11, w, 'y')
+        self.silent('def f():\n'
+                    '  import sys\n'
+                    '  return sys.argv\n')
+        self.silent('def f():\n'
+                    '  from sys import argv\n'
+                    '  return argv\n')
+        self.silent('def f():\n'
+                    '  from sys import *\n'
+                    '  return argv\n')
+        self.silent('def f():\n'
+                    '  return [(a, b) for a, b in [(1,2)]]\n')
+        self.silent('def f():\n'
+                    '  r = [(a, b) for a, b in [(1,2)]]\n'
+                    '  return r, a, b\n')
+        self.silent('import pychecker2.utest\n'
+                    'print pychecker2.utest.data.exceptions.Warning()')

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/usage.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/usage.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/usage.py
new file mode 100644
index 0000000..8ac02fb
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/usage.py
@@ -0,0 +1,7 @@
+from pychecker2.TestSupport import WarningTester
+from StringIO import StringIO
+
+class UsageTestCase(WarningTester):
+    def testUsage(self):
+        self.options.usage(['-?'], StringIO())
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e25b46/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/warnings.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/warnings.py b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/warnings.py
new file mode 100644
index 0000000..44a81ef
--- /dev/null
+++ b/tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/utest/warnings.py
@@ -0,0 +1,23 @@
+from pychecker2 import TestSupport
+from pychecker2 import OpChecks
+from pychecker2 import main
+
+from StringIO import StringIO
+
+class OpTests(TestSupport.WarningTester):
+
+    def _get_warnings(self):
+        out = StringIO()
+        f = self.check_file('def f(x):\n'
+                            '   return +x\n')
+        assert len(f.warnings) == 1
+        line, warning, args = f.warnings[0]
+        main.print_warnings(f, out)
+        return out.getvalue()
+    
+    def testWarningSuppression(self):
+        # check cmd-line warning suppression
+        assert self._get_warnings() != ''
+        self.argv = ['--no-operatorPlus']
+        assert self._get_warnings() == ''
+


Mime
View raw message