Author: hwright
Date: Wed Jul 28 01:52:26 2010
New Revision: 979927

URL: http://svn.apache.org/viewvc?rev=979927&view=rev
Log:
Run the Mouse tests in the test directory, allowing us to use relative paths.
Also, return the cwd world back to where it was when we started.

* tests/test_mouse.py
  (data_path): Use a relative path.
  (main): Restore the cwd.

Modified:
    labs/mouse/tests/test_mouse.py

Modified: labs/mouse/tests/test_mouse.py
URL: 
http://svn.apache.org/viewvc/labs/mouse/tests/test_mouse.py?rev=979927&r1=979926&r2=979927&view=diff
==============================================================================
--- labs/mouse/tests/test_mouse.py (original)
+++ labs/mouse/tests/test_mouse.py Wed Jul 28 01:52:26 2010
@@ -32,7 +32,7 @@ sys.path.append(os.path.dirname(sys.path
 
 import mouse
 
-data_path = os.path.join(sys.path[0], 'data')
+data_path = 'data'
 resources_path = os.path.join(os.path.dirname(sys.path[0]), 'resources')
 
 
@@ -157,6 +157,8 @@ class TestSources(unittest.TestCase):
 
 if __name__ == '__main__':
   # change the cwd to the directory
+  cwd = os.getcwd()
   os.chdir(os.path.dirname(sys.argv[0]))
 
   unittest.main()
+  os.chdir(cwd)



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to