Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
docker-py
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
docker-py
Commits
9d09a137
Kaydet (Commit)
9d09a137
authored
Haz 28, 2017
tarafından
Joffrey F
Kaydeden (comit)
GitHub
Haz 28, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge pull request #1669 from shin-/1668-split-port
split_port should not break when passed a non-string argument
üst
e1344382
a8722fb0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
ports.py
docker/utils/ports.py
+1
-0
utils_test.py
tests/unit/utils_test.py
+3
-0
No files found.
docker/utils/ports.py
Dosyayı görüntüle @
9d09a137
...
...
@@ -54,6 +54,7 @@ def port_range(start, end, proto, randomly_available_port=False):
def
split_port
(
port
):
port
=
str
(
port
)
match
=
PORT_SPEC
.
match
(
port
)
if
match
is
None
:
_raise_invalid_port
(
port
)
...
...
tests/unit/utils_test.py
Dosyayı görüntüle @
9d09a137
...
...
@@ -587,6 +587,9 @@ class PortsTest(unittest.TestCase):
def
test_split_port_empty_string
(
self
):
self
.
assertRaises
(
ValueError
,
lambda
:
split_port
(
""
))
def
test_split_port_non_string
(
self
):
assert
split_port
(
1243
)
==
([
'1243'
],
None
)
def
test_build_port_bindings_with_one_port
(
self
):
port_bindings
=
build_port_bindings
([
"127.0.0.1:1000:1000"
])
self
.
assertEqual
(
port_bindings
[
"1000"
],
[(
"127.0.0.1"
,
"1000"
)])
...
...
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