summaryrefslogtreecommitdiff
path: root/tests/test_overall.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_overall.py')
-rw-r--r--tests/test_overall.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/test_overall.py b/tests/test_overall.py
new file mode 100644
index 00000000..05fdc6d8
--- /dev/null
+++ b/tests/test_overall.py
@@ -0,0 +1,29 @@
+import os
+import re
+import sys
+import unittest
+import tabnanny
+import compileall
+
+class TestOverall(unittest.TestCase):
+
+ """
+ Test overall package health by compiling and checking
+ code style.
+ """
+
+ def testModules(self):
+ """Testing all modules by compiling them"""
+ src = '.%ssleekxmpp' % os.sep
+ if sys.version_info < (3, 0):
+ rx = re.compile('/[.]svn')
+ else:
+ rx = re.compile('/[.]svn|.*26.*')
+ self.failUnless(compileall.compile_dir(src, rx=rx, quiet=True))
+
+ def testTabNanny(self):
+ """Testing that indentation is consistent"""
+ self.failIf(tabnanny.check('..%ssleekxmpp' % os.sep))
+
+
+suite = unittest.TestLoader().loadTestsFromTestCase(TestOverall)