Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
fd88318a
Kaydet (Commit)
fd88318a
authored
May 19, 2011
tarafından
Tarek Ziade
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #12115: skipping all tests that need threading under a threadless environment
üst
cfd365b9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
4 deletions
+35
-4
test_command_upload_docs.py
Lib/packaging/tests/test_command_upload_docs.py
+8
-1
test_install.py
Lib/packaging/tests/test_install.py
+10
-1
test_pypi_server.py
Lib/packaging/tests/test_pypi_server.py
+9
-1
test_pypi_xmlrpc.py
Lib/packaging/tests/test_pypi_xmlrpc.py
+8
-1
No files found.
Lib/packaging/tests/test_command_upload_docs.py
Dosyayı görüntüle @
fd88318a
...
...
@@ -11,7 +11,12 @@ from packaging.dist import Distribution
from
packaging.errors
import
PackagingFileError
,
PackagingOptionError
from
packaging.tests
import
unittest
,
support
from
packaging.tests.pypi_server
import
PyPIServerTestCase
try
:
import
threading
from
packaging.tests.pypi_server
import
PyPIServerTestCase
except
ImportError
:
threading
=
None
PyPIServerTestCase
=
object
EXPECTED_MULTIPART_OUTPUT
=
[
...
...
@@ -41,6 +46,8 @@ username = real_slim_shady
password = long_island
"""
@unittest.skipIf
(
threading
is
None
,
"Needs threading"
)
class
UploadDocsTestCase
(
support
.
TempdirManager
,
support
.
EnvironRestorer
,
support
.
LoggingCatcher
,
...
...
Lib/packaging/tests/test_install.py
Dosyayı görüntüle @
fd88318a
...
...
@@ -7,7 +7,12 @@ from packaging.pypi.xmlrpc import Client
from
packaging.metadata
import
Metadata
from
packaging.tests.support
import
LoggingCatcher
,
TempdirManager
,
unittest
from
packaging.tests.pypi_server
import
use_xmlrpc_server
try
:
import
threading
from
packaging.tests.pypi_server
import
use_xmlrpc_server
except
ImportError
:
threading
=
None
use_xmlrpc_server
=
None
class
InstalledDist
:
...
...
@@ -96,6 +101,7 @@ class TestInstall(LoggingCatcher, TempdirManager, unittest.TestCase):
conflict
=
[(
o
.
name
,
str
(
o
.
version
))
for
o
in
output
[
'conflict'
]]
return
installed
,
remove
,
conflict
@unittest.skipIf
(
threading
is
None
,
'needs threading'
)
@use_xmlrpc_server
()
def
test_existing_deps
(
self
,
server
):
# Test that the installer get the dependencies from the metadatas
...
...
@@ -132,6 +138,7 @@ class TestInstall(LoggingCatcher, TempdirManager, unittest.TestCase):
self
.
assertIn
((
'towel-stuff'
,
'0.1'
),
readable_output
)
self
.
assertIn
((
'choxie'
,
'2.0.0.9'
),
readable_output
)
@unittest.skipIf
(
threading
is
None
,
'needs threading'
)
@use_xmlrpc_server
()
def
test_upgrade_existing_deps
(
self
,
server
):
client
=
self
.
_get_client
(
server
)
...
...
@@ -164,6 +171,7 @@ class TestInstall(LoggingCatcher, TempdirManager, unittest.TestCase):
self
.
assertIn
((
'bacon'
,
'0.1'
),
remove
)
self
.
assertEqual
(
0
,
len
(
output
[
'conflict'
]))
@unittest.skipIf
(
threading
is
None
,
'needs threading'
)
@use_xmlrpc_server
()
def
test_conflicts
(
self
,
server
):
# Tests that conflicts are detected
...
...
@@ -202,6 +210,7 @@ class TestInstall(LoggingCatcher, TempdirManager, unittest.TestCase):
self
.
assertIn
((
'bacon'
,
'0.1'
),
remove
)
self
.
assertIn
((
'chicken'
,
'1.1'
),
conflict
)
@unittest.skipIf
(
threading
is
None
,
'needs threading'
)
@use_xmlrpc_server
()
def
test_installation_unexisting_project
(
self
,
server
):
# Test that the isntalled raises an exception if the project does not
...
...
Lib/packaging/tests/test_pypi_server.py
Dosyayı görüntüle @
fd88318a
...
...
@@ -5,10 +5,18 @@ import urllib.request
import
urllib.parse
import
urllib.error
from
packaging.tests.pypi_server
import
PyPIServer
,
PYPI_DEFAULT_STATIC_PATH
try
:
import
threading
from
packaging.tests.pypi_server
import
PyPIServer
,
PYPI_DEFAULT_STATIC_PATH
except
ImportError
:
threading
=
None
PyPIServer
=
None
PYPI_DEFAULT_STATIC_PATH
=
None
from
packaging.tests
import
unittest
@unittest.skipIf
(
threading
is
None
,
"Needs threading"
)
class
PyPIServerTest
(
unittest
.
TestCase
):
def
test_records_requests
(
self
):
...
...
Lib/packaging/tests/test_pypi_xmlrpc.py
Dosyayı görüntüle @
fd88318a
...
...
@@ -3,9 +3,16 @@
from
packaging.pypi.xmlrpc
import
Client
,
InvalidSearchField
,
ProjectNotFound
from
packaging.tests
import
unittest
from
packaging.tests.pypi_server
import
use_xmlrpc_server
try
:
import
threading
from
packaging.tests.pypi_server
import
use_xmlrpc_server
except
ImportError
:
threading
=
None
use_xmlrpc_server
=
None
@unittest.skipIf
(
threading
is
None
,
"Needs threading"
)
class
TestXMLRPCClient
(
unittest
.
TestCase
):
def
_get_client
(
self
,
server
,
*
args
,
**
kwargs
):
return
Client
(
server
.
full_address
,
*
args
,
**
kwargs
)
...
...
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