File tree Expand file tree Collapse file tree 6 files changed +9
-20
lines changed Expand file tree Collapse file tree 6 files changed +9
-20
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,10 @@ build-py3:
13
13
test : unit-test integration-test unit-test-py3 integration-test-py3
14
14
15
15
unit-test : build
16
- docker run docker-py python tests/test.py
16
+ docker run docker-py py.test tests/test.py
17
17
18
18
unit-test-py3 : build-py3
19
- docker run docker-py3 python tests/test.py
19
+ docker run docker-py3 py.test tests/test.py
20
20
21
21
integration-test : build
22
22
docker run -e NOT_ON_HOST=true -v ` $( HOST_TMPDIR) ` :/tmp -v /var/run/docker.sock:/var/run/docker.sock docker-py python tests/integration_test.py
Original file line number Diff line number Diff line change 1
1
mock==1.0.1
2
- coverage==3.7.1
2
+ pytest==2.7.2
3
+ pytest-cov==2.1.0
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- import fake_stat
15
+ from . import fake_stat
16
16
17
17
CURRENT_VERSION = 'v1.19'
18
18
Original file line number Diff line number Diff line change 27
27
import tempfile
28
28
import threading
29
29
import time
30
- import unittest
31
30
import warnings
32
31
import random
33
32
34
33
import docker
35
34
import requests
36
35
import six
37
36
38
- import base
39
- import fake_api
37
+ from . import base
38
+ from . import fake_api
40
39
41
40
try :
42
41
from unittest import mock
@@ -2331,6 +2330,3 @@ def test_early_stream_response(self):
2331
2330
2332
2331
self .assertEqual (list (stream ), [
2333
2332
str (i ).encode () for i in range (50 )])
2334
-
2335
- if __name__ == '__main__' :
2336
- unittest .main ()
Original file line number Diff line number Diff line change 1
1
import os
2
2
import os .path
3
- import unittest
4
3
import tempfile
5
4
6
5
from docker .client import Client
13
12
from docker .utils .ports import build_port_bindings , split_port
14
13
from docker .auth import resolve_repository_name , resolve_authconfig
15
14
16
- import base
15
+ from . import base
17
16
18
17
19
18
class UtilsTest (base .BaseTestCase ):
@@ -474,6 +473,3 @@ def test_build_port_bindings_with_nonmatching_internal_port_ranges(self):
474
473
["127.0.0.1:1000:1000" , "127.0.0.1:2000:2000" ])
475
474
self .assertEqual (port_bindings ["1000" ], [("127.0.0.1" , "1000" )])
476
475
self .assertEqual (port_bindings ["2000" ], [("127.0.0.1" , "2000" )])
477
-
478
- if __name__ == '__main__' :
479
- unittest .main ()
Original file line number Diff line number Diff line change @@ -5,11 +5,7 @@ skipsdist=True
5
5
[testenv]
6
6
usedevelop =True
7
7
commands =
8
- {envbindir}/coverage run -p tests/test.py
9
- {envbindir}/coverage run -p tests/utils_test.py
10
- {envbindir}/coverage combine
11
- {envbindir}/coverage report
12
- {envbindir}/coverage html
8
+ py.test --cov =docker tests/test.py tests/utils_test.py
13
9
deps =
14
10
-r{toxinidir}/test-requirements.txt
15
11
-r{toxinidir}/requirements.txt
You can’t perform that action at this time.
0 commit comments