Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
2690461a
Commit
2690461a
authored
Jun 11, 2010
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #8965: Add a regression test to test_sys with LANG=C
parent
9e19ca42
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
Lib/test/test_sys.py
Lib/test/test_sys.py
+13
-2
No files found.
Lib/test/test_sys.py
View file @
2690461a
...
...
@@ -863,10 +863,21 @@ class SizeofTest(unittest.TestCase):
# sys.flags
check
(
sys
.
flags
,
size
(
vh
)
+
self
.
P
*
len
(
sys
.
flags
))
@
unittest
.
skipUnless
(
sys
.
platform
==
'darwin'
,
"test specific to Mac OS X"
)
def
test_getfilesystemencoding
(
self
):
# On Darwing FS encoding is always UTF-8
fs_encoding
=
sys
.
getfilesystemencoding
()
if
sys
.
platform
==
'darwin'
:
self
.
assertEqual
(
fs_encoding
,
'utf-8'
)
self
.
assertEqual
(
fs_encoding
,
'utf-8'
)
# Even in C locale
env
=
os
.
environ
.
copy
()
env
[
'LANG'
]
=
'C'
output
=
subprocess
.
check_output
(
[
sys
.
executable
,
"-c"
,
"import sys; print(sys.getfilesystemencoding())"
],
env
=
env
)
fs_encoding
=
output
.
rstrip
()
self
.
assertEqual
(
fs_encoding
,
b'utf-8'
)
def
test_setfilesystemencoding
(
self
):
old
=
sys
.
getfilesystemencoding
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment