This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author meador.inge
Recipients meador.inge
Date 2009-10-11.23:33:31
SpamBayes Score 1.6601628e-06
Marked as misclassified No
Message-id <1255304015.86.0.913588485284.issue7108@psf.upfronthosting.co.za>
In-reply-to
Content
I am testing this out of the trunk on OS X 10.5.7:

uclid:trunk minge$ uname -a
Darwin euclid.local 9.7.0 Darwin Kernel Version 9.7.0: Tue Mar 31
22:52:17 PDT 2009; root:xnu-1228.12.14~1/RELEASE_I386 i386
euclid:trunk minge$ ./python.exe Lib/test/test_commands.py
test_getoutput (__main__.CommandTests) ... ok
test_getstatus (__main__.CommandTests) ... FAIL

======================================================================
FAIL: test_getstatus (__main__.CommandTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_commands.py", line 60, in test_getstatus
    self.assertTrue(re.match(pat, getstatus("/."), re.VERBOSE))
AssertionError: None is not True

----------------------------------------------------------------------
Ran 2 tests in 0.047s

FAILED (failures=1)
Traceback (most recent call last):
  File "Lib/test/test_commands.py", line 69, in <module>
    test_main()
  File "Lib/test/test_commands.py", line 64, in test_main
    run_unittest(CommandTests)
  File
"/Users/minge/Research/Languages/python/trunk/Lib/test/test_support.py",
line 884, in run_unittest
    _run_suite(suite)
  File
"/Users/minge/Research/Languages/python/trunk/Lib/test/test_support.py",
line 867, in _run_suite
    raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent call last):
  File "Lib/test/test_commands.py", line 60, in test_getstatus
    self.assertTrue(re.match(pat, getstatus("/."), re.VERBOSE))
AssertionError: None is not True

[30608 refs]
euclid:trunk minge$ patch -p0 < test_commands.patch 
patching file Lib/test/test_commands.py
euclid:trunk minge$ ./python.exe Lib/test/test_commands.py
test_getoutput (__main__.CommandTests) ... ok
test_getstatus (__main__.CommandTests) ... ok

----------------------------------------------------------------------
Ran 2 tests in 0.040s

OK
[30459 refs]

According to the OS X documentation for ls(1) [1] the output of ls can
include the '@' character to denote that file has "extended attributes".
 The attached patch adjust the regex which is applied to the output of
ls to account for this fact (a more rigorous approach would have
conditioned the '@' check on OS X, but I wasn't sure if it was worth the
added complexity).  

[1]
http://developer.apple.com/mac/library/DOCUMENTATION/Darwin/Reference/ManPages/man1/ls.1.html
History
Date User Action Args
2009-10-11 23:33:35meador.ingesetrecipients: + meador.inge
2009-10-11 23:33:35meador.ingesetmessageid: <1255304015.86.0.913588485284.issue7108@psf.upfronthosting.co.za>
2009-10-11 23:33:34meador.ingelinkissue7108 messages
2009-10-11 23:33:32meador.ingecreate