mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Test test_pep277 is only relevant for Unicode-friendly filesystems.
This commit is contained in:
parent
fa31eaa5f6
commit
c0a9d4152d
2 changed files with 8 additions and 5 deletions
|
@ -2,9 +2,6 @@
|
||||||
# open, os.open, os.stat. os.listdir, os.rename, os.remove, os.mkdir, os.chdir, os.rmdir
|
# open, os.open, os.stat. os.listdir, os.rename, os.remove, os.mkdir, os.chdir, os.rmdir
|
||||||
import sys, os, unittest
|
import sys, os, unittest
|
||||||
from test import test_support
|
from test import test_support
|
||||||
## There's no obvious reason to skip these tests on POSIX systems
|
|
||||||
# if not os.path.supports_unicode_filenames:
|
|
||||||
# raise unittest.SkipTest, "test works only on NT+"
|
|
||||||
|
|
||||||
filenames = [
|
filenames = [
|
||||||
'abc',
|
'abc',
|
||||||
|
@ -37,7 +34,12 @@ class UnicodeFileTests(unittest.TestCase):
|
||||||
except OSError:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
for name in self.files:
|
for name in self.files:
|
||||||
|
try:
|
||||||
f = open(name, 'w')
|
f = open(name, 'w')
|
||||||
|
except UnicodeEncodeError:
|
||||||
|
if not os.path.supports_unicode_filenames:
|
||||||
|
raise unittest.SkipTest("test works only on NT+, and with "
|
||||||
|
"pseudo-Unicode filesystems")
|
||||||
f.write((name+'\n').encode("utf-8"))
|
f.write((name+'\n').encode("utf-8"))
|
||||||
f.close()
|
f.close()
|
||||||
os.stat(name)
|
os.stat(name)
|
||||||
|
|
|
@ -106,7 +106,8 @@ Extension Modules
|
||||||
Tests
|
Tests
|
||||||
-----
|
-----
|
||||||
|
|
||||||
- Issue #767675: enable test_pep277 on all platforms.
|
- Issue #767675: enable test_pep277 on POSIX platforms with Unicode-friendly
|
||||||
|
filesystem encoding.
|
||||||
|
|
||||||
- Issue #6292: for the moment at least, the test suite runs cleanly if python
|
- Issue #6292: for the moment at least, the test suite runs cleanly if python
|
||||||
is run with the -OO flag. Tests requiring docstrings are skipped.
|
is run with the -OO flag. Tests requiring docstrings are skipped.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue