diff options
author | Jhon Honce <jhonce@redhat.com> | 2021-03-01 10:55:20 -0700 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2021-03-01 13:15:59 -0700 |
commit | 7927fe01f165bb4a3f381601d847036a3a130182 (patch) | |
tree | 1ed8c48b6187a80b3822cf41431e92972fb0ad20 /test/python/docker/common.py | |
parent | 73044b28172fd0df23836052a9061dc41f51f39a (diff) | |
download | podman-7927fe01f165bb4a3f381601d847036a3a130182.tar.gz podman-7927fe01f165bb4a3f381601d847036a3a130182.tar.bz2 podman-7927fe01f165bb4a3f381601d847036a3a130182.zip |
Refactor python tests to run against python3.9
* Introduce sub-package compat to meet packaging and import requirements
* Update documenation for running tests
* Add requirements.txt to improve IDE support
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'test/python/docker/common.py')
-rw-r--r-- | test/python/docker/common.py | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/test/python/docker/common.py b/test/python/docker/common.py deleted file mode 100644 index 11f512495..000000000 --- a/test/python/docker/common.py +++ /dev/null @@ -1,21 +0,0 @@ -from docker import DockerClient - -from test.python.docker import constant - - -def run_top_container(client: DockerClient): - c = client.containers.create(constant.ALPINE, command="top", detach=True, tty=True, name="top") - c.start() - return c.id - - -def remove_all_containers(client: DockerClient): - for ctnr in client.containers.list(all=True): - ctnr.remove(force=True) - - -def remove_all_images(client: DockerClient): - for img in client.images.list(): - # FIXME should DELETE /images accept the sha256: prefix? - id_ = img.id.removeprefix("sha256:") - client.images.remove(id_, force=True) |