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
492b9893
Commit
492b9893
authored
Dec 21, 2013
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix DeprecationWarnings in test suite
parent
17c93260
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
23 deletions
+23
-23
Lib/distutils/tests/test_dist.py
Lib/distutils/tests/test_dist.py
+8
-8
Lib/distutils/tests/test_upload.py
Lib/distutils/tests/test_upload.py
+5
-5
Lib/test/test_shutil.py
Lib/test/test_shutil.py
+7
-7
Lib/test/test_strftime.py
Lib/test/test_strftime.py
+3
-3
No files found.
Lib/distutils/tests/test_dist.py
View file @
492b9893
...
...
@@ -406,14 +406,14 @@ class MetadataTestCase(support.TempdirManager, support.EnvironGuard,
PKG_INFO
.
seek
(
0
)
metadata
.
read_pkg_file
(
PKG_INFO
)
self
.
assertEqual
s
(
metadata
.
name
,
"package"
)
self
.
assertEqual
s
(
metadata
.
version
,
"1.0"
)
self
.
assertEqual
s
(
metadata
.
description
,
"xxx"
)
self
.
assertEqual
s
(
metadata
.
download_url
,
'http://example.com'
)
self
.
assertEqual
s
(
metadata
.
keywords
,
[
'one'
,
'two'
])
self
.
assertEqual
s
(
metadata
.
platforms
,
[
'UNKNOWN'
])
self
.
assertEqual
s
(
metadata
.
obsoletes
,
None
)
self
.
assertEqual
s
(
metadata
.
requires
,
[
'foo'
])
self
.
assertEqual
(
metadata
.
name
,
"package"
)
self
.
assertEqual
(
metadata
.
version
,
"1.0"
)
self
.
assertEqual
(
metadata
.
description
,
"xxx"
)
self
.
assertEqual
(
metadata
.
download_url
,
'http://example.com'
)
self
.
assertEqual
(
metadata
.
keywords
,
[
'one'
,
'two'
])
self
.
assertEqual
(
metadata
.
platforms
,
[
'UNKNOWN'
])
self
.
assertEqual
(
metadata
.
obsoletes
,
None
)
self
.
assertEqual
(
metadata
.
requires
,
[
'foo'
])
def
test_suite
():
suite
=
unittest
.
TestSuite
()
...
...
Lib/distutils/tests/test_upload.py
View file @
492b9893
...
...
@@ -114,11 +114,11 @@ class uploadTestCase(PyPIRCCommandTestCase):
# what did we send ?
headers
=
dict
(
self
.
last_open
.
req
.
headers
)
self
.
assertEqual
(
headers
[
'Content-length'
],
'2087'
)
self
.
assert
_
(
headers
[
'Content-type'
].
startswith
(
'multipart/form-data'
))
self
.
assertEqual
s
(
self
.
last_open
.
req
.
get_method
(),
'POST'
)
self
.
assertEqual
s
(
self
.
last_open
.
req
.
get_full_url
(),
'http://pypi.python.org/pypi'
)
self
.
assert
_
(
b'xxx'
in
self
.
last_open
.
req
.
data
)
self
.
assert
True
(
headers
[
'Content-type'
].
startswith
(
'multipart/form-data'
))
self
.
assertEqual
(
self
.
last_open
.
req
.
get_method
(),
'POST'
)
self
.
assertEqual
(
self
.
last_open
.
req
.
get_full_url
(),
'http://pypi.python.org/pypi'
)
self
.
assert
In
(
b'xxx'
,
self
.
last_open
.
req
.
data
)
def
test_suite
():
return
unittest
.
makeSuite
(
uploadTestCase
)
...
...
Lib/test/test_shutil.py
View file @
492b9893
...
...
@@ -742,15 +742,15 @@ class TestShutil(unittest.TestCase):
os
.
chmod
(
restrictive_subdir
,
0o600
)
shutil
.
copytree
(
src_dir
,
dst_dir
)
self
.
assertEqual
s
(
os
.
stat
(
src_dir
).
st_mode
,
os
.
stat
(
dst_dir
).
st_mode
)
self
.
assertEqual
s
(
os
.
stat
(
os
.
path
.
join
(
src_dir
,
'permissive.txt'
)).
st_mode
,
os
.
stat
(
os
.
path
.
join
(
dst_dir
,
'permissive.txt'
)).
st_mode
)
self
.
assertEqual
s
(
os
.
stat
(
os
.
path
.
join
(
src_dir
,
'restrictive.txt'
)).
st_mode
,
os
.
stat
(
os
.
path
.
join
(
dst_dir
,
'restrictive.txt'
)).
st_mode
)
self
.
assertEqual
(
os
.
stat
(
src_dir
).
st_mode
,
os
.
stat
(
dst_dir
).
st_mode
)
self
.
assertEqual
(
os
.
stat
(
os
.
path
.
join
(
src_dir
,
'permissive.txt'
)).
st_mode
,
os
.
stat
(
os
.
path
.
join
(
dst_dir
,
'permissive.txt'
)).
st_mode
)
self
.
assertEqual
(
os
.
stat
(
os
.
path
.
join
(
src_dir
,
'restrictive.txt'
)).
st_mode
,
os
.
stat
(
os
.
path
.
join
(
dst_dir
,
'restrictive.txt'
)).
st_mode
)
restrictive_subdir_dst
=
os
.
path
.
join
(
dst_dir
,
os
.
path
.
split
(
restrictive_subdir
)[
1
])
self
.
assertEqual
s
(
os
.
stat
(
restrictive_subdir
).
st_mode
,
os
.
stat
(
restrictive_subdir_dst
).
st_mode
)
self
.
assertEqual
(
os
.
stat
(
restrictive_subdir
).
st_mode
,
os
.
stat
(
restrictive_subdir_dst
).
st_mode
)
@
unittest
.
skipIf
(
os
.
name
==
'nt'
,
'temporarily disabled on Windows'
)
@
unittest
.
skipUnless
(
hasattr
(
os
,
'link'
),
'requires os.link'
)
...
...
Lib/test/test_strftime.py
View file @
492b9893
...
...
@@ -189,15 +189,15 @@ class Y1900Tests(unittest.TestCase):
@
unittest
.
skipIf
(
sys
.
platform
==
"win32"
,
"Doesn't apply on Windows"
)
def
test_y_before_1900_nonwin
(
self
):
self
.
assertEqual
s
(
self
.
assertEqual
(
time
.
strftime
(
"%y"
,
(
1899
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
0
)),
"99"
)
def
test_y_1900
(
self
):
self
.
assertEqual
s
(
self
.
assertEqual
(
time
.
strftime
(
"%y"
,
(
1900
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
0
)),
"00"
)
def
test_y_after_1900
(
self
):
self
.
assertEqual
s
(
self
.
assertEqual
(
time
.
strftime
(
"%y"
,
(
2013
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
0
)),
"13"
)
def
test_main
():
...
...
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