From: <pj...@us...> - 2009-06-08 07:06:09
|
Revision: 6469 http://jython.svn.sourceforge.net/jython/?rev=6469&view=rev Author: pjenvey Date: 2009-06-08 07:06:07 +0000 (Mon, 08 Jun 2009) Log Message: ----------- rename to test_nt_paths_jy and add to skips Modified Paths: -------------- trunk/jython/Lib/test/regrtest.py Added Paths: ----------- trunk/jython/Lib/test/test_nt_paths_jy.py Removed Paths: ------------- trunk/jython/Lib/test/test_nt_paths.py Modified: trunk/jython/Lib/test/regrtest.py =================================================================== --- trunk/jython/Lib/test/regrtest.py 2009-06-08 06:41:36 UTC (rev 6468) +++ trunk/jython/Lib/test/regrtest.py 2009-06-08 07:06:07 UTC (rev 6469) @@ -1538,6 +1538,8 @@ self.expected.update([ 'test_grp', 'test_mhlib', 'test_posix', 'test_pwd', 'test_signal']) + if os._name != 'nt': + self.expected.add('test_nt_paths_jy') self.valid = True Deleted: trunk/jython/Lib/test/test_nt_paths.py =================================================================== --- trunk/jython/Lib/test/test_nt_paths.py 2009-06-08 06:41:36 UTC (rev 6468) +++ trunk/jython/Lib/test/test_nt_paths.py 2009-06-08 07:06:07 UTC (rev 6469) @@ -1,40 +0,0 @@ -"""Test path handling on Windows - -Made for Jython. -""" -from __future__ import with_statement -import os -import unittest -from test import test_support - -class NTAbspathTestCase(unittest.TestCase): - - def setUp(self): - with open(test_support.TESTFN, 'w') as fp: - fp.write('foo') - - # Move to the same drive as TESTFN - drive, self.path = os.path.splitdrive(os.path.abspath( - test_support.TESTFN)) - self.orig_cwd = os.getcwd() - os.chdir(os.path.join(drive, os.sep)) - - def tearDown(self): - os.chdir(self.orig_cwd) - os.remove(test_support.TESTFN) - - def test_abspaths(self): - # Ensure r'\TESTFN' and '/TESTFN' are handled as absolute - for path in self.path, self.path.replace('\\', '/'): - with open(path) as fp: - self.assertEqual(fp.read(), 'foo') - - -def test_main(): - if (os._name if test_support.is_jython else os.name) != 'nt': - raise test_support.TestSkipped('NT specific test') - test_support.run_unittest(NTAbspathTestCase) - - -if __name__ == '__main__': - test_main() Copied: trunk/jython/Lib/test/test_nt_paths_jy.py (from rev 6468, trunk/jython/Lib/test/test_nt_paths.py) =================================================================== --- trunk/jython/Lib/test/test_nt_paths_jy.py (rev 0) +++ trunk/jython/Lib/test/test_nt_paths_jy.py 2009-06-08 07:06:07 UTC (rev 6469) @@ -0,0 +1,40 @@ +"""Test path handling on Windows + +Made for Jython. +""" +from __future__ import with_statement +import os +import unittest +from test import test_support + +class NTAbspathTestCase(unittest.TestCase): + + def setUp(self): + with open(test_support.TESTFN, 'w') as fp: + fp.write('foo') + + # Move to the same drive as TESTFN + drive, self.path = os.path.splitdrive(os.path.abspath( + test_support.TESTFN)) + self.orig_cwd = os.getcwd() + os.chdir(os.path.join(drive, os.sep)) + + def tearDown(self): + os.chdir(self.orig_cwd) + os.remove(test_support.TESTFN) + + def test_abspaths(self): + # Ensure r'\TESTFN' and '/TESTFN' are handled as absolute + for path in self.path, self.path.replace('\\', '/'): + with open(path) as fp: + self.assertEqual(fp.read(), 'foo') + + +def test_main(): + if (os._name if test_support.is_jython else os.name) != 'nt': + raise test_support.TestSkipped('NT specific test') + test_support.run_unittest(NTAbspathTestCase) + + +if __name__ == '__main__': + test_main() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |