git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a42105
)
added misc test
author
Scott Baker
<bakers@cs.arizona.edu>
Thu, 7 Aug 2008 18:54:33 +0000
(18:54 +0000)
committer
Scott Baker
<bakers@cs.arizona.edu>
Thu, 7 Aug 2008 18:54:33 +0000
(18:54 +0000)
tests/testMisc.py
[new file with mode: 0644]
patch
|
blob
diff --git a/tests/testMisc.py
b/tests/testMisc.py
new file mode 100644
(file)
index 0000000..
a6ea9df
--- /dev/null
+++ b/
tests/testMisc.py
@@ -0,0
+1,18
@@
+import unittest
+from misc import *
+
+class TestMisc(unittest.TestCase):
+ def setUp(self):
+ pass
+
+ def testGetLeft(self):
+ self.assertEqual(get_leaf("foo"), "foo")
+ self.assertEqual(get_leaf("foo.bar"), "bar")
+
+ def testGetAuthority(self):
+ self.assertEqual(get_authority("foo"), "")
+ self.assertEqual(get_authority("foo.bar"), "foo")
+ self.assertEqual(get_authority("foo.bar.x"), "foo.bar")
+
+if __name__ == "__main__":
+ unittest.main()