summaryrefslogtreecommitdiff
path: root/pies
diff options
context:
space:
mode:
authorTimothy Crosley <timothy.crosley@gmail.com>2013-12-14 21:16:42 -0500
committerTimothy Crosley <timothy.crosley@gmail.com>2013-12-14 21:16:42 -0500
commitd3428185d881e380f3e233533d37a303bef78ec4 (patch)
tree1b82a1c123c364133c773c2d56e352cd49c6a2c0 /pies
parent3921cd051b685ef8024840512fc81f7e39e3cefd (diff)
downloadpies-d3428185d881e380f3e233533d37a303bef78ec4.tar.gz
Add new modules and document
Diffstat (limited to 'pies')
-rw-r--r--pies/ast.py10
-rw-r--r--pies/unittest.py13
2 files changed, 23 insertions, 0 deletions
diff --git a/pies/ast.py b/pies/ast.py
new file mode 100644
index 0000000..43739a1
--- /dev/null
+++ b/pies/ast.py
@@ -0,0 +1,10 @@
+from __future__ import absolute_import
+
+from ast import *
+
+from .version_info import PY2
+
+if PY2:
+ Try = TryExcept
+else:
+ TryFinally = ()
diff --git a/pies/unittest.py b/pies/unittest.py
new file mode 100644
index 0000000..03b130e
--- /dev/null
+++ b/pies/unittest.py
@@ -0,0 +1,13 @@
+from __future__ import absolute_import
+
+import sys
+from unittest import *
+
+if sys.version_info < (2, 7):
+ skip = lambda why: (lambda func: 'skip')
+ skipIf = lambda cond, why: (skip(why) if cond else lambda func: func)
+
+ class TestCase(TestCase):
+ def assertIs(self, expr1, expr2, msg=None):
+ if expr1 is not expr2:
+ self.fail(msg or '%r is not %r' % (expr1, expr2))