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
e5f9cbda
Commit
e5f9cbda
authored
May 23, 2011
by
Tarek Ziade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skip more tests in packaging if threading is not supported
parent
a3c1545a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
3 deletions
+20
-3
Lib/packaging/tests/test_command_upload.py
Lib/packaging/tests/test_command_upload.py
+7
-1
Lib/packaging/tests/test_pypi_dist.py
Lib/packaging/tests/test_pypi_dist.py
+7
-1
Lib/packaging/tests/test_pypi_xmlrpc.py
Lib/packaging/tests/test_pypi_xmlrpc.py
+6
-1
No files found.
Lib/packaging/tests/test_command_upload.py
View file @
e5f9cbda
...
...
@@ -7,7 +7,12 @@ from packaging.dist import Distribution
from
packaging.errors
import
PackagingOptionError
from
packaging.tests
import
unittest
,
support
from
packaging.tests.pypi_server
import
PyPIServer
,
PyPIServerTestCase
try
:
import
threading
from
packaging.tests.pypi_server
import
PyPIServerTestCase
except
ImportError
:
threading
=
None
PyPIServerTestCase
=
unittest
.
TestCase
PYPIRC_NOPASSWORD
=
"""
\
...
...
@@ -39,6 +44,7 @@ repository:http://another.pypi/
"""
@
unittest
.
skipIf
(
threading
is
None
,
'needs threading'
)
class
UploadTestCase
(
support
.
TempdirManager
,
support
.
EnvironRestorer
,
support
.
LoggingCatcher
,
PyPIServerTestCase
):
...
...
Lib/packaging/tests/test_pypi_dist.py
View file @
e5f9cbda
...
...
@@ -8,7 +8,11 @@ from packaging.pypi.errors import HashDoesNotMatch, UnsupportedHashName
from
packaging.tests
import
unittest
from
packaging.tests.support
import
TempdirManager
,
requires_zlib
from
packaging.tests.pypi_server
import
use_pypi_server
try
:
import
threading
from
packaging.tests.pypi_server
import
use_pypi_server
except
ImportError
:
threading
=
use_pypi_server
=
None
def
Dist
(
*
args
,
**
kwargs
):
...
...
@@ -120,6 +124,7 @@ class TestDistInfo(TempdirManager, unittest.TestCase):
# assert we can't compare dists with different names
self
.
assertRaises
(
TypeError
,
foo1
.
__eq__
,
bar
)
@
unittest
.
skipIf
(
threading
is
None
,
'needs threading'
)
@
use_pypi_server
(
"downloads_with_md5"
)
def
test_download
(
self
,
server
):
# Download is possible, and the md5 is checked if given
...
...
@@ -158,6 +163,7 @@ class TestDistInfo(TempdirManager, unittest.TestCase):
hashname
=
"invalid_hashname"
,
hashval
=
"value"
)
@
unittest
.
skipIf
(
threading
is
None
,
'needs threading'
)
@
requires_zlib
@
use_pypi_server
(
'downloads_with_md5'
)
def
test_unpack
(
self
,
server
):
...
...
Lib/packaging/tests/test_pypi_xmlrpc.py
View file @
e5f9cbda
...
...
@@ -9,7 +9,12 @@ try:
from
packaging.tests.pypi_server
import
use_xmlrpc_server
except
ImportError
:
threading
=
None
use_xmlrpc_server
=
None
def
use_xmlrpc_server
():
def
_use
(
func
):
def
__use
(
*
args
,
**
kw
):
return
func
(
*
args
,
**
kw
)
return
__use
return
_use
@
unittest
.
skipIf
(
threading
is
None
,
"Needs threading"
)
...
...
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