SF.net SVN: fclient: [346] trunk/sandbox/fcp2/test_fcp/test_key.py
Status: Pre-Alpha
Brought to you by:
jurner
From: <jU...@us...> - 2008-03-08 11:15:43
|
Revision: 346 http://fclient.svn.sourceforge.net/fclient/?rev=346&view=rev Author: jUrner Date: 2008-03-08 03:15:48 -0800 (Sat, 08 Mar 2008) Log Message: ----------- tests for keys Added Paths: ----------- trunk/sandbox/fcp2/test_fcp/test_key.py Added: trunk/sandbox/fcp2/test_fcp/test_key.py =================================================================== --- trunk/sandbox/fcp2/test_fcp/test_key.py (rev 0) +++ trunk/sandbox/fcp2/test_fcp/test_key.py 2008-03-08 11:15:48 UTC (rev 346) @@ -0,0 +1,52 @@ +"""Unittests for fcp2.key.py""" + +import os, sys +import socket +import unittest + +#--> rel import hack +class _RelImportHack(object): + def __init__(self, n): + fpath = os.path.abspath(__file__) + for i in xrange(n): fpath = os.path.dirname(fpath) + sys.path.insert(0, fpath) + def __del__(self): sys.path.pop(0) +hack = _RelImportHack(3) + +from fcp2.client import Client +from fcp2 import consts +from fcp2 import types + + + +del hack +#<-- rel import hack +#**************************************************************************************** +# +#**************************************************************************************** +class TestKeys(unittest.TestCase): + + pass + + +#********************************************************************************* +# +#********************************************************************************* +def suite(): + tests = ( + TestKeys, + ) + + suite = unittest.TestSuite() + for test in tests: + suite.addTest(unittest.makeSuite(test)) + return suite + + +def test(): + unittest.TextTestRunner(verbosity=1).run(suite()) + +if __name__ == '__main__': + test() + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |