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
b7264984
Commit
b7264984
authored
Aug 17, 2013
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#18741: fix more typos. Patch by Févry Thibault.
parent
7791a03c
Changes
22
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
38 additions
and
36 deletions
+38
-36
Lib/concurrent/futures/process.py
Lib/concurrent/futures/process.py
+2
-2
Lib/ctypes/test/runtests.py
Lib/ctypes/test/runtests.py
+1
-1
Lib/ctypes/test/test_cfuncs.py
Lib/ctypes/test/test_cfuncs.py
+1
-1
Lib/ctypes/test/test_numbers.py
Lib/ctypes/test/test_numbers.py
+1
-1
Lib/ctypes/test/test_refcounts.py
Lib/ctypes/test/test_refcounts.py
+3
-3
Lib/ctypes/test/test_structures.py
Lib/ctypes/test/test_structures.py
+1
-1
Lib/distutils/command/install.py
Lib/distutils/command/install.py
+1
-1
Lib/distutils/command/sdist.py
Lib/distutils/command/sdist.py
+1
-1
Lib/distutils/tests/test_build_clib.py
Lib/distutils/tests/test_build_clib.py
+1
-1
Lib/idlelib/idle_test/mock_tk.py
Lib/idlelib/idle_test/mock_tk.py
+4
-4
Lib/idlelib/idle_test/test_formatparagraph.py
Lib/idlelib/idle_test/test_formatparagraph.py
+1
-1
Lib/lib2to3/fixes/fix_itertools.py
Lib/lib2to3/fixes/fix_itertools.py
+2
-2
Lib/lib2to3/fixes/fix_metaclass.py
Lib/lib2to3/fixes/fix_metaclass.py
+1
-1
Lib/lib2to3/tests/test_parser.py
Lib/lib2to3/tests/test_parser.py
+1
-1
Lib/sqlite3/test/regression.py
Lib/sqlite3/test/regression.py
+4
-2
Lib/sqlite3/test/types.py
Lib/sqlite3/test/types.py
+1
-1
Lib/test/support/__init__.py
Lib/test/support/__init__.py
+2
-2
Lib/test/test_email/test_headerregistry.py
Lib/test/test_email/test_headerregistry.py
+6
-6
Lib/unittest/test/test_case.py
Lib/unittest/test/test_case.py
+1
-1
Lib/unittest/test/test_loader.py
Lib/unittest/test/test_loader.py
+1
-1
Lib/unittest/test/test_program.py
Lib/unittest/test/test_program.py
+1
-1
Lib/xml/etree/ElementTree.py
Lib/xml/etree/ElementTree.py
+1
-1
No files found.
Lib/concurrent/futures/process.py
View file @
b7264984
...
@@ -297,7 +297,7 @@ def _check_system_limits():
...
@@ -297,7 +297,7 @@ def _check_system_limits():
# sysconf not available or setting not available
# sysconf not available or setting not available
return
return
if
nsems_max
==
-
1
:
if
nsems_max
==
-
1
:
# indetermine limit, assume that limit is determined
# indetermine
d
limit, assume that limit is determined
# by available memory only
# by available memory only
return
return
if
nsems_max
>=
256
:
if
nsems_max
>=
256
:
...
@@ -411,7 +411,7 @@ class ProcessPoolExecutor(_base.Executor):
...
@@ -411,7 +411,7 @@ class ProcessPoolExecutor(_base.Executor):
self
.
_result_queue
.
put
(
None
)
self
.
_result_queue
.
put
(
None
)
if
wait
:
if
wait
:
self
.
_queue_management_thread
.
join
()
self
.
_queue_management_thread
.
join
()
# To reduce the risk of open
n
ing too many files, remove references to
# To reduce the risk of opening too many files, remove references to
# objects that use file descriptors.
# objects that use file descriptors.
self
.
_queue_management_thread
=
None
self
.
_queue_management_thread
=
None
self
.
_call_queue
=
None
self
.
_call_queue
=
None
...
...
Lib/ctypes/test/runtests.py
View file @
b7264984
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
Run all tests found in this directory, and print a summary of the results.
Run all tests found in this directory, and print a summary of the results.
Command line flags:
Command line flags:
-q quiet mode: don't prnt anything while the tests are running
-q quiet mode: don't pr
i
nt anything while the tests are running
-r run tests repeatedly, look for refcount leaks
-r run tests repeatedly, look for refcount leaks
-u<resources>
-u<resources>
Add resources to the lits of allowed resources. '*' allows all
Add resources to the lits of allowed resources. '*' allows all
...
...
Lib/ctypes/test/test_cfuncs.py
View file @
b7264984
...
@@ -188,7 +188,7 @@ class CFunctions(unittest.TestCase):
...
@@ -188,7 +188,7 @@ class CFunctions(unittest.TestCase):
self
.
assertEqual
(
self
.
_dll
.
tv_i
(
-
42
),
None
)
self
.
assertEqual
(
self
.
_dll
.
tv_i
(
-
42
),
None
)
self
.
assertEqual
(
self
.
S
(),
-
42
)
self
.
assertEqual
(
self
.
S
(),
-
42
)
# The following repeat
e
s the above tests with stdcall functions (where
# The following repeats the above tests with stdcall functions (where
# they are available)
# they are available)
try
:
try
:
WinDLL
WinDLL
...
...
Lib/ctypes/test/test_numbers.py
View file @
b7264984
...
@@ -213,7 +213,7 @@ class NumberTestCase(unittest.TestCase):
...
@@ -213,7 +213,7 @@ class NumberTestCase(unittest.TestCase):
def
test_init
(
self
):
def
test_init
(
self
):
# c_int() can be initialized from Python's int, and c_int.
# c_int() can be initialized from Python's int, and c_int.
# Not from c_long or so, which seems strange, ab
d
should
# Not from c_long or so, which seems strange, ab
c
should
# probably be changed:
# probably be changed:
self
.
assertRaises
(
TypeError
,
c_int
,
c_long
(
42
))
self
.
assertRaises
(
TypeError
,
c_int
,
c_long
(
42
))
...
...
Lib/ctypes/test/test_refcounts.py
View file @
b7264984
...
@@ -44,7 +44,7 @@ class RefcountTestCase(unittest.TestCase):
...
@@ -44,7 +44,7 @@ class RefcountTestCase(unittest.TestCase):
# this is the standard refcount for func
# this is the standard refcount for func
self
.
assertEqual
(
grc
(
func
),
2
)
self
.
assertEqual
(
grc
(
func
),
2
)
# the CFuncPtr instance holds at
r
least one refcount on func:
# the CFuncPtr instance holds at least one refcount on func:
f
=
OtherCallback
(
func
)
f
=
OtherCallback
(
func
)
self
.
assertTrue
(
grc
(
func
)
>
2
)
self
.
assertTrue
(
grc
(
func
)
>
2
)
...
@@ -61,7 +61,7 @@ class RefcountTestCase(unittest.TestCase):
...
@@ -61,7 +61,7 @@ class RefcountTestCase(unittest.TestCase):
x
=
X
()
x
=
X
()
x
.
a
=
OtherCallback
(
func
)
x
.
a
=
OtherCallback
(
func
)
# the CFuncPtr instance holds at
r
least one refcount on func:
# the CFuncPtr instance holds at least one refcount on func:
self
.
assertTrue
(
grc
(
func
)
>
2
)
self
.
assertTrue
(
grc
(
func
)
>
2
)
# and may release it again
# and may release it again
...
@@ -74,7 +74,7 @@ class RefcountTestCase(unittest.TestCase):
...
@@ -74,7 +74,7 @@ class RefcountTestCase(unittest.TestCase):
f
=
OtherCallback
(
func
)
f
=
OtherCallback
(
func
)
# the CFuncPtr instance holds at
r
least one refcount on func:
# the CFuncPtr instance holds at least one refcount on func:
self
.
assertTrue
(
grc
(
func
)
>
2
)
self
.
assertTrue
(
grc
(
func
)
>
2
)
# create a cycle
# create a cycle
...
...
Lib/ctypes/test/test_structures.py
View file @
b7264984
...
@@ -108,7 +108,7 @@ class StructureTestCase(unittest.TestCase):
...
@@ -108,7 +108,7 @@ class StructureTestCase(unittest.TestCase):
def
test_emtpy
(
self
):
def
test_emtpy
(
self
):
# I had problems with these
# I had problems with these
#
#
# Although these are patological cases: Empty Structures!
# Although these are pat
h
ological cases: Empty Structures!
class
X
(
Structure
):
class
X
(
Structure
):
_fields_
=
[]
_fields_
=
[]
...
...
Lib/distutils/command/install.py
View file @
b7264984
...
@@ -545,7 +545,7 @@ class install(Command):
...
@@ -545,7 +545,7 @@ class install(Command):
self
.
extra_dirs
=
extra_dirs
self
.
extra_dirs
=
extra_dirs
def
change_roots
(
self
,
*
names
):
def
change_roots
(
self
,
*
names
):
"""Change the install direcories pointed by name using root."""
"""Change the install direc
t
ories pointed by name using root."""
for
name
in
names
:
for
name
in
names
:
attr
=
"install_"
+
name
attr
=
"install_"
+
name
setattr
(
self
,
attr
,
change_root
(
self
.
root
,
getattr
(
self
,
attr
)))
setattr
(
self
,
attr
,
change_root
(
self
.
root
,
getattr
(
self
,
attr
)))
...
...
Lib/distutils/command/sdist.py
View file @
b7264984
...
@@ -175,7 +175,7 @@ class sdist(Command):
...
@@ -175,7 +175,7 @@ class sdist(Command):
depends on the user's options.
depends on the user's options.
"""
"""
# new behavior when using a template:
# new behavior when using a template:
# the file list is recalculated everytime because
# the file list is recalculated every
time because
# even if MANIFEST.in or setup.py are not changed
# even if MANIFEST.in or setup.py are not changed
# the user might have added some files in the tree that
# the user might have added some files in the tree that
# need to be included.
# need to be included.
...
...
Lib/distutils/tests/test_build_clib.py
View file @
b7264984
...
@@ -77,7 +77,7 @@ class BuildCLibTestCase(support.TempdirManager,
...
@@ -77,7 +77,7 @@ class BuildCLibTestCase(support.TempdirManager,
cmd
.
compiler
=
FakeCompiler
()
cmd
.
compiler
=
FakeCompiler
()
# build_libraries is also doing a bit of typo
e
checking
# build_libraries is also doing a bit of typo checking
lib
=
[(
'name'
,
{
'sources'
:
'notvalid'
})]
lib
=
[(
'name'
,
{
'sources'
:
'notvalid'
})]
self
.
assertRaises
(
DistutilsSetupError
,
cmd
.
build_libraries
,
lib
)
self
.
assertRaises
(
DistutilsSetupError
,
cmd
.
build_libraries
,
lib
)
...
...
Lib/idlelib/idle_test/mock_tk.py
View file @
b7264984
...
@@ -35,7 +35,7 @@ class Mbox:
...
@@ -35,7 +35,7 @@ class Mbox:
"""Mock for tkinter.messagebox with an Mbox_func for each function.
"""Mock for tkinter.messagebox with an Mbox_func for each function.
This module was 'tkMessageBox' in 2.x; hence the 'import as' in 3.x.
This module was 'tkMessageBox' in 2.x; hence the 'import as' in 3.x.
Example usage in test_module.py for testing functios in module.py:
Example usage in test_module.py for testing functio
n
s in module.py:
---
---
from idlelib.idle_test.mock_tk import Mbox
from idlelib.idle_test.mock_tk import Mbox
import module
import module
...
@@ -98,7 +98,7 @@ class Text:
...
@@ -98,7 +98,7 @@ class Text:
This implements .index without converting the result back to a string.
This implements .index without converting the result back to a string.
The result is contrained by the number of lines and linelengths of
The result is contrained by the number of lines and linelengths of
self.data. For many indexes, the result is initally (1, 0).
self.data. For many indexes, the result is init
i
ally (1, 0).
The input index may have any of several possible forms:
The input index may have any of several possible forms:
* line.char float: converted to 'line.char' string;
* line.char float: converted to 'line.char' string;
...
@@ -149,7 +149,7 @@ class Text:
...
@@ -149,7 +149,7 @@ class Text:
-1: position before terminal
\
n
; for .insert(), .delete
-1: position before terminal
\
n
; for .insert(), .delete
0: position after terminal
\
n
; for .get, .delete index 1
0: position after terminal
\
n
; for .get, .delete index 1
1: same viewed as begin
in
ning of non-existent next line (for .index)
1: same viewed as beginning of non-existent next line (for .index)
'''
'''
n
=
len
(
self
.
data
)
n
=
len
(
self
.
data
)
if
endflag
==
1
:
if
endflag
==
1
:
...
@@ -271,7 +271,7 @@ class Text:
...
@@ -271,7 +271,7 @@ class Text:
"Scroll screen to make the character at INDEX is visible."
"Scroll screen to make the character at INDEX is visible."
pass
pass
# The following is a Misc method inherite
t
by Text.
# The following is a Misc method inherite
d
by Text.
# It should properly go in a Misc mock, but is included here for now.
# It should properly go in a Misc mock, but is included here for now.
def
bind
(
sequence
=
None
,
func
=
None
,
add
=
None
):
def
bind
(
sequence
=
None
,
func
=
None
,
add
=
None
):
...
...
Lib/idlelib/idle_test/test_formatparagraph.py
View file @
b7264984
...
@@ -244,7 +244,7 @@ class FormatEventTest(unittest.TestCase):
...
@@ -244,7 +244,7 @@ class FormatEventTest(unittest.TestCase):
"""Test the formatting of text inside a Text widget.
"""Test the formatting of text inside a Text widget.
This is done with FormatParagraph.format.paragraph_event,
This is done with FormatParagraph.format.paragraph_event,
which calls funtions in the module as appropriate.
which calls fun
c
tions in the module as appropriate.
"""
"""
test_string
=
(
test_string
=
(
" '''this is a test of a reformat for a triple "
" '''this is a test of a reformat for a triple "
...
...
Lib/lib2to3/fixes/fix_itertools.py
View file @
b7264984
...
@@ -34,8 +34,8 @@ class FixItertools(fixer_base.BaseFix):
...
@@ -34,8 +34,8 @@ class FixItertools(fixer_base.BaseFix):
# Remove the 'itertools'
# Remove the 'itertools'
prefix
=
it
.
prefix
prefix
=
it
.
prefix
it
.
remove
()
it
.
remove
()
# Replace the node wich contains ('.', 'function') with the
# Replace the node w
h
ich contains ('.', 'function') with the
# function (to be consist
a
nt with the second part of the pattern)
# function (to be consist
e
nt with the second part of the pattern)
dot
.
remove
()
dot
.
remove
()
func
.
parent
.
replace
(
func
)
func
.
parent
.
replace
(
func
)
...
...
Lib/lib2to3/fixes/fix_metaclass.py
View file @
b7264984
...
@@ -71,7 +71,7 @@ def fixup_parse_tree(cls_node):
...
@@ -71,7 +71,7 @@ def fixup_parse_tree(cls_node):
def
fixup_simple_stmt
(
parent
,
i
,
stmt_node
):
def
fixup_simple_stmt
(
parent
,
i
,
stmt_node
):
""" if there is a semi-colon all the parts count as part of the same
""" if there is a semi-colon all the parts count as part of the same
simple_stmt. We just want the __metaclass__ part so we move
simple_stmt. We just want the __metaclass__ part so we move
everything
e
fter the semi-colon into its own simple_stmt node
everything
a
fter the semi-colon into its own simple_stmt node
"""
"""
for
semi_ind
,
node
in
enumerate
(
stmt_node
.
children
):
for
semi_ind
,
node
in
enumerate
(
stmt_node
.
children
):
if
node
.
type
==
token
.
SEMI
:
# *sigh*
if
node
.
type
==
token
.
SEMI
:
# *sigh*
...
...
Lib/lib2to3/tests/test_parser.py
View file @
b7264984
...
@@ -77,7 +77,7 @@ class TestRaiseChanges(GrammarTest):
...
@@ -77,7 +77,7 @@ class TestRaiseChanges(GrammarTest):
self
.
invalid_syntax
(
"raise E from"
)
self
.
invalid_syntax
(
"raise E from"
)
# Adapated from Python 3's Lib/test/test_grammar.py:GrammarTests.testFuncdef
# Adap
t
ated from Python 3's Lib/test/test_grammar.py:GrammarTests.testFuncdef
class
TestFunctionAnnotations
(
GrammarTest
):
class
TestFunctionAnnotations
(
GrammarTest
):
def
test_1
(
self
):
def
test_1
(
self
):
self
.
validate
(
"""def f(x) -> list: pass"""
)
self
.
validate
(
"""def f(x) -> list: pass"""
)
...
...
Lib/sqlite3/test/regression.py
View file @
b7264984
...
@@ -161,7 +161,8 @@ class RegressionTests(unittest.TestCase):
...
@@ -161,7 +161,8 @@ class RegressionTests(unittest.TestCase):
def
CheckCursorConstructorCallCheck
(
self
):
def
CheckCursorConstructorCallCheck
(
self
):
"""
"""
Verifies that cursor methods check wether base class __init__ was called.
Verifies that cursor methods check whether base class __init__ was
called.
"""
"""
class
Cursor
(
sqlite
.
Cursor
):
class
Cursor
(
sqlite
.
Cursor
):
def
__init__
(
self
,
con
):
def
__init__
(
self
,
con
):
...
@@ -187,7 +188,8 @@ class RegressionTests(unittest.TestCase):
...
@@ -187,7 +188,8 @@ class RegressionTests(unittest.TestCase):
def
CheckConnectionConstructorCallCheck
(
self
):
def
CheckConnectionConstructorCallCheck
(
self
):
"""
"""
Verifies that connection methods check wether base class __init__ was called.
Verifies that connection methods check whether base class __init__ was
called.
"""
"""
class
Connection
(
sqlite
.
Connection
):
class
Connection
(
sqlite
.
Connection
):
def
__init__
(
self
,
name
):
def
__init__
(
self
,
name
):
...
...
Lib/sqlite3/test/types.py
View file @
b7264984
...
@@ -229,7 +229,7 @@ class DeclTypesTests(unittest.TestCase):
...
@@ -229,7 +229,7 @@ class DeclTypesTests(unittest.TestCase):
self
.
assertEqual
(
type
(
value
),
float
)
self
.
assertEqual
(
type
(
value
),
float
)
def
CheckNumber2
(
self
):
def
CheckNumber2
(
self
):
"""Checks wether converter names are cut off at '(' characters"""
"""Checks w
h
ether converter names are cut off at '(' characters"""
self
.
cur
.
execute
(
"insert into test(n2) values (5)"
)
self
.
cur
.
execute
(
"insert into test(n2) values (5)"
)
value
=
self
.
cur
.
execute
(
"select n2 from test"
).
fetchone
()[
0
]
value
=
self
.
cur
.
execute
(
"select n2 from test"
).
fetchone
()[
0
]
# if the converter is not used, it's an int instead of a float
# if the converter is not used, it's an int instead of a float
...
...
Lib/test/support/__init__.py
View file @
b7264984
...
@@ -246,7 +246,7 @@ def unload(name):
...
@@ -246,7 +246,7 @@ def unload(name):
if
sys
.
platform
.
startswith
(
"win"
):
if
sys
.
platform
.
startswith
(
"win"
):
def
_waitfor
(
func
,
pathname
,
waitall
=
False
):
def
_waitfor
(
func
,
pathname
,
waitall
=
False
):
# Peform the operation
# Pe
r
form the operation
func
(
pathname
)
func
(
pathname
)
# Now setup the wait loop
# Now setup the wait loop
if
waitall
:
if
waitall
:
...
@@ -262,7 +262,7 @@ if sys.platform.startswith("win"):
...
@@ -262,7 +262,7 @@ if sys.platform.startswith("win"):
# required when contention occurs.
# required when contention occurs.
timeout
=
0.001
timeout
=
0.001
while
timeout
<
1.0
:
while
timeout
<
1.0
:
# Note we are only testing for the exist
a
nce of the file(s) in
# Note we are only testing for the exist
e
nce of the file(s) in
# the contents of the directory regardless of any security or
# the contents of the directory regardless of any security or
# access rights. If we have made it this far, we have sufficient
# access rights. If we have made it this far, we have sufficient
# permissions to do that much using Python's equivalent of the
# permissions to do that much using Python's equivalent of the
...
...
Lib/test/test_email/test_headerregistry.py
View file @
b7264984
...
@@ -531,7 +531,7 @@ class TestContentTypeHeader(TestHeaderBase):
...
@@ -531,7 +531,7 @@ class TestContentTypeHeader(TestHeaderBase):
'
\
t
name*1*=%2A%2A%2Afun%2A%2A%2A%20;
\
t
name*2="is it not.pdf"
\
n
'
),
'
\
t
name*1*=%2A%2A%2Afun%2A%2A%2A%20;
\
t
name*2="is it not.pdf"
\
n
'
),
),
),
# Make sure we also handle it if there are spur
rious double qou
tes.
# Make sure we also handle it if there are spur
ious double quo
tes.
'rfc2231_encoded_with_double_quotes'
:
(
'rfc2231_encoded_with_double_quotes'
:
(
(
"text/plain;"
(
"text/plain;"
'
\
t
name*0*="us-ascii
\
'
\
'
This%20is%20even%20more%20";'
'
\
t
name*0*="us-ascii
\
'
\
'
This%20is%20even%20more%20";'
...
@@ -711,8 +711,8 @@ class TestContentTypeHeader(TestHeaderBase):
...
@@ -711,8 +711,8 @@ class TestContentTypeHeader(TestHeaderBase):
# in double quotes, making the value a valid non-encoded string. The
# in double quotes, making the value a valid non-encoded string. The
# old parser decodes this just like the previous case, which may be the
# old parser decodes this just like the previous case, which may be the
# better Postel rule, but could equally result in borking headers that
# better Postel rule, but could equally result in borking headers that
# intenti
ally have quoted quotes in them. We could get this 98% right
# intenti
onally have quoted quotes in them. We could get this 98%
# if we treat it as a quoted string *unless* it matches the
#
right
if we treat it as a quoted string *unless* it matches the
# charset'lang'value pattern exactly *and* there is at least one
# charset'lang'value pattern exactly *and* there is at least one
# encoded segment. Implementing that algorithm will require some
# encoded segment. Implementing that algorithm will require some
# refactoring, so I haven't done it (yet).
# refactoring, so I haven't done it (yet).
...
@@ -944,7 +944,7 @@ class TestMIMEVersionHeader(TestHeaderBase):
...
@@ -944,7 +944,7 @@ class TestMIMEVersionHeader(TestHeaderBase):
[
errors
.
InvalidHeaderDefect
]),
[
errors
.
InvalidHeaderDefect
]),
# Unrecoverable invalid values. We *could* apply more heuristics to
# Unrecoverable invalid values. We *could* apply more heuristics to
# get someing out of the first two, but doing so is not worth the
# get some
th
ing out of the first two, but doing so is not worth the
# effort.
# effort.
'non_comment_garbage_before'
:
(
'non_comment_garbage_before'
:
(
...
@@ -1541,13 +1541,13 @@ class TestFolding(TestHeaderBase):
...
@@ -1541,13 +1541,13 @@ class TestFolding(TestHeaderBase):
def
test_fold_unstructured_with_commas
(
self
):
def
test_fold_unstructured_with_commas
(
self
):
# The old wrapper would fold this at the commas.
# The old wrapper would fold this at the commas.
h
=
self
.
make_header
(
'Subject'
,
"This header is intended to "
h
=
self
.
make_header
(
'Subject'
,
"This header is intended to "
"demonstrate, in a fairly su
s
inct way, that we now do "
"demonstrate, in a fairly su
cc
inct way, that we now do "
"not give a , special treatment in unstructured headers."
)
"not give a , special treatment in unstructured headers."
)
self
.
assertEqual
(
self
.
assertEqual
(
h
.
fold
(
policy
=
policy
.
default
.
clone
(
max_line_length
=
60
)),
h
.
fold
(
policy
=
policy
.
default
.
clone
(
max_line_length
=
60
)),
textwrap
.
dedent
(
"""
\
textwrap
.
dedent
(
"""
\
Subject: This header is intended to demonstrate, in a fairly
Subject: This header is intended to demonstrate, in a fairly
su
s
inct way, that we now do not give a , special treatment
su
cc
inct way, that we now do not give a , special treatment
in unstructured headers.
in unstructured headers.
"""
))
"""
))
...
...
Lib/unittest/test/test_case.py
View file @
b7264984
...
@@ -1054,7 +1054,7 @@ test case
...
@@ -1054,7 +1054,7 @@ test case
self
.
assertWarns
(
DeprecationWarning
,
_runtime_warn
)
self
.
assertWarns
(
DeprecationWarning
,
_runtime_warn
)
def
testAssertWarnsContext
(
self
):
def
testAssertWarnsContext
(
self
):
# Believe it or not, it is prefer
r
able to duplicate all tests above,
# Believe it or not, it is preferable to duplicate all tests above,
# to make sure the __warningregistry__ $@ is circumvented correctly.
# to make sure the __warningregistry__ $@ is circumvented correctly.
def
_runtime_warn
():
def
_runtime_warn
():
warnings
.
warn
(
"foo"
,
RuntimeWarning
)
warnings
.
warn
(
"foo"
,
RuntimeWarning
)
...
...
Lib/unittest/test/test_loader.py
View file @
b7264984
...
@@ -324,7 +324,7 @@ class Test_TestLoader(unittest.TestCase):
...
@@ -324,7 +324,7 @@ class Test_TestLoader(unittest.TestCase):
# Does loadTestsFromName raise TypeError when the `module` argument
# Does loadTestsFromName raise TypeError when the `module` argument
# isn't a module object?
# isn't a module object?
#
#
# XXX Accepts the not-a-module object, ignor
n
ing the object's type
# XXX Accepts the not-a-module object, ignoring the object's type
# This should raise an exception or the method name should be changed
# This should raise an exception or the method name should be changed
#
#
# XXX Some people are relying on this, so keep it for now
# XXX Some people are relying on this, so keep it for now
...
...
Lib/unittest/test/test_program.py
View file @
b7264984
...
@@ -330,7 +330,7 @@ class TestCommandLineArgs(unittest.TestCase):
...
@@ -330,7 +330,7 @@ class TestCommandLineArgs(unittest.TestCase):
self
.
assertEqual
(
program
.
testNames
,
argv
[
1
:])
self
.
assertEqual
(
program
.
testNames
,
argv
[
1
:])
# it may be better to use platform specific functions to normalise paths
# it may be better to use platform specific functions to normalise paths
# rather than accepting '.PY' and '\' as file seprator on Linux / Mac
# rather than accepting '.PY' and '\' as file sep
a
rator on Linux / Mac
# it would also be better to check that a filename is a valid module
# it would also be better to check that a filename is a valid module
# identifier (we have a regex for this in loader.py)
# identifier (we have a regex for this in loader.py)
# for invalid filenames should we raise a useful error rather than
# for invalid filenames should we raise a useful error rather than
...
...
Lib/xml/etree/ElementTree.py
View file @
b7264984
...
@@ -836,7 +836,7 @@ class ElementTree:
...
@@ -836,7 +836,7 @@ class ElementTree:
@
contextlib
.
contextmanager
@
contextlib
.
contextmanager
def
_get_writer
(
file_or_filename
,
encoding
):
def
_get_writer
(
file_or_filename
,
encoding
):
# returns text write method and release all resour
s
es after using
# returns text write method and release all resour
c
es after using
try
:
try
:
write
=
file_or_filename
.
write
write
=
file_or_filename
.
write
except
AttributeError
:
except
AttributeError
:
...
...
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