repo_id
stringclasses
409 values
prefix
large_stringlengths
34
36.3k
target
large_stringlengths
1
498
assertion_type
stringclasses
31 values
difficulty
stringclasses
8 values
test_file
stringlengths
10
121
test_function
stringlengths
1
104
test_class
stringlengths
0
51
lineno
int32
2
11.3k
commit_idx
int32
gabrieldemarmiesse/python-on-whales
import datetime as dt import json import re from pathlib import Path import pytest from python_on_whales import DockerClient from python_on_whales.components.pod.models import PodInspectResult from python_on_whales.exceptions import NoSuchPod from python_on_whales.test_utils import get_all_jsons, random_name def tes...
True
assert
bool_literal
tests/python_on_whales/components/test_pod.py
test_start_with_container
129
null
gabrieldemarmiesse/python-on-whales
from datetime import timedelta import pytest from python_on_whales import DockerClient from python_on_whales.exceptions import NotASwarmManager @pytest.mark.usefixtures("swarm_mode") def test_swarm_unlock_key(docker_client: DockerClient): docker_client.swarm.update(autolock=True) first_key = docker_client.sw...
docker_client.swarm.unlock_key(rotate=True)
assert
func_call
tests/python_on_whales/components/test_swarm.py
test_swarm_unlock_key
44
null
gabrieldemarmiesse/python-on-whales
import pytest from python_on_whales import docker from python_on_whales.exceptions import DockerException def test_not_showing_password_in_exception(): chosen_password = "ignore_password" with pytest.raises(DockerException) as excinfo: docker.login(username="ignore_user", password=chosen_password) ...
exception.docker_command
assert
complex_expr
tests/python_on_whales/test_exceptions.py
test_not_showing_password_in_exception
33
null
gabrieldemarmiesse/python-on-whales
import datetime as dt import pytest from python_on_whales import DockerClient @pytest.mark.usefixtures("swarm_mode") def test_swarm_update_auto_lock_managers(docker_client: DockerClient, tmp_path): secret_file = tmp_path / "secret.txt" secret_file.write_text("hello") my_secret = docker_client.secret.crea...
my_secret3
assert
variable
tests/python_on_whales/components/test_secret.py
test_swarm_update_auto_lock_managers
28
null
gabrieldemarmiesse/python-on-whales
import json import tempfile import time import pytest from python_on_whales import DockerClient from python_on_whales.components.service.models import ServiceInspectResult from python_on_whales.exceptions import NoSuchService, NotASwarmManager from python_on_whales.test_utils import get_all_jsons, random_name @pytes...
set_services
assert
variable
tests/python_on_whales/components/test_service.py
test_remove_empty_services_list
84
null
gabrieldemarmiesse/python-on-whales
import json import os import signal import sys import tempfile import time from datetime import datetime, timedelta, timezone from pathlib import Path from typing import Literal, Union from unittest.mock import Mock, patch import pytest import python_on_whales from python_on_whales import DockerClient, Image, docker ...
0
assert
numeric_literal
tests/python_on_whales/components/test_container.py
test_container_state
461
null
gabrieldemarmiesse/python-on-whales
import pytest from python_on_whales import docker from python_on_whales.utils import PROJECT_ROOT bake_test_dir = PROJECT_ROOT / "tests/python_on_whales/components/bake_tests" bake_file = bake_test_dir / "docker-bake.hcl" def test_imagetools_create_with_annotations_command_construction(): annotations = { ...
"Test image"
assert
string_literal
tests/python_on_whales/components/buildx/imagetools/test_imagetools_cli_wrapper.py
test_imagetools_create_with_annotations_command_construction
101
null
gabrieldemarmiesse/python-on-whales
import json import tempfile import time import pytest from python_on_whales import DockerClient from python_on_whales.components.service.models import ServiceInspectResult from python_on_whales.exceptions import NoSuchService, NotASwarmManager from python_on_whales.test_utils import get_all_jsons, random_name @pytes...
{"Replicas": 1}
assert
collection
tests/python_on_whales/components/test_service.py
test_service_scale
95
null
gabrieldemarmiesse/python-on-whales
import json from datetime import datetime, timedelta, timezone from pathlib import Path import pytest from python_on_whales import DockerClient from python_on_whales.components.volume.models import VolumeInspectResult from python_on_whales.exceptions import NoSuchVolume from python_on_whales.test_utils import get_all...
set(ctr_client.volume.list())
assert
func_call
tests/python_on_whales/components/test_volume.py
test_volume_remove_empty_list
335
null
gabrieldemarmiesse/python-on-whales
import datetime as dt import json import re from pathlib import Path import pytest from python_on_whales import DockerClient from python_on_whales.components.pod.models import PodInspectResult from python_on_whales.exceptions import NoSuchPod from python_on_whales.test_utils import get_all_jsons, random_name def tes...
"1"
assert
string_literal
tests/python_on_whales/components/test_pod.py
test_create_share_arg
235
null
gabrieldemarmiesse/python-on-whales
import pytest from python_on_whales import docker from python_on_whales.exceptions import DockerException def test_exception_attributes(): with pytest.raises(
DockerException)
pytest.raises
variable
tests/python_on_whales/test_exceptions.py
test_exception_attributes
8
null
gabrieldemarmiesse/python-on-whales
import time from pathlib import Path from typing import Generator import pytest from python_on_whales import DockerClient from python_on_whales.components.stack.cli_wrapper import Stack from python_on_whales.exceptions import NotASwarmManager from python_on_whales.utils import PROJECT_ROOT def stack( docker_clie...
[third_stack]
assert
collection
tests/python_on_whales/components/test_stack.py
test_stack_env_files
87
null
gabrieldemarmiesse/python-on-whales
import json from pathlib import Path from typing import List import pytest from python_on_whales import DockerClient from python_on_whales.components.plugin.models import PluginInspectResult from python_on_whales.test_utils import get_all_jsons test_plugin_name = "vieux/sshfs:latest" def get_all_plugins_jsons() -> ...
docker_client.plugin.list()
assert
func_call
tests/python_on_whales/components/test_plugin.py
test_install_plugin_disable_enable
30
null
gabrieldemarmiesse/python-on-whales
import json import os import tarfile from pathlib import Path from unittest.mock import Mock, patch import pytest import python_on_whales.components.buildx.cli_wrapper from python_on_whales import docker from python_on_whales.exceptions import DockerException from python_on_whales.test_utils import set_cache_validity...
cmd
assert
variable
tests/python_on_whales/components/buildx/test_buildx_cli_wrapper.py
test_bake_metadata_file_option
766
null
gabrieldemarmiesse/python-on-whales
import logging import python_on_whales.utils def test_debug_level_logging(caplog): caplog.set_level(logging.DEBUG) command = ["echo", "hello"] python_on_whales.utils.run(command) assert " ".join(command) in
caplog.text
assert
complex_expr
tests/python_on_whales/test_logging.py
test_debug_level_logging
10
null
gabrieldemarmiesse/python-on-whales
import json import tempfile import time import pytest from python_on_whales import DockerClient from python_on_whales.components.service.models import ServiceInspectResult from python_on_whales.exceptions import NoSuchService, NotASwarmManager from python_on_whales.test_utils import get_all_jsons, random_name @pytes...
"dodo"
assert
string_literal
tests/python_on_whales/components/test_service.py
test_get_logs
36
null
gabrieldemarmiesse/python-on-whales
import time from pathlib import Path from typing import Generator import pytest from python_on_whales import DockerClient from python_on_whales.components.stack.cli_wrapper import Stack from python_on_whales.exceptions import NotASwarmManager from python_on_whales.utils import PROJECT_ROOT def stack( docker_clie...
services_tasks
assert
variable
tests/python_on_whales/components/test_stack.py
test_stack_ps_and_services
51
null
gabrieldemarmiesse/python-on-whales
import json from datetime import datetime, timedelta, timezone from pathlib import Path import pytest from python_on_whales import DockerClient from python_on_whales.components.volume.models import VolumeInspectResult from python_on_whales.exceptions import NoSuchVolume from python_on_whales.test_utils import get_all...
str(e.value).lower()
assert
func_call
tests/python_on_whales/components/test_volume.py
test_functions_no_such_volume
284
null
gabrieldemarmiesse/python-on-whales
import json import pytest from python_on_whales import DockerClient from python_on_whales.components.context.models import ContextInspectResult from python_on_whales.test_utils import get_all_jsons def test_create_context(docker_client: DockerClient): testname = "testpow" host = "ssh://test@test.domain" ...
all_contexts_before
assert
variable
tests/python_on_whales/components/test_context.py
test_create_context
30
null
gabrieldemarmiesse/python-on-whales
import json from datetime import datetime, timedelta, timezone from pathlib import Path import pytest from python_on_whales import DockerClient from python_on_whales.components.volume.models import VolumeInspectResult from python_on_whales.exceptions import NoSuchVolume from python_on_whales.test_utils import get_all...
NoSuchVolume)
pytest.raises
variable
tests/python_on_whales/components/test_volume.py
test_functions_no_such_volume
282
null
gabrieldemarmiesse/python-on-whales
import datetime as dt import json import re from pathlib import Path import pytest from python_on_whales import DockerClient from python_on_whales.components.pod.models import PodInspectResult from python_on_whales.exceptions import NoSuchPod from python_on_whales.test_utils import get_all_jsons, random_name def tes...
pod_name
assert
variable
tests/python_on_whales/components/test_pod.py
test_create_simple
25
null
gabrieldemarmiesse/python-on-whales
import json from datetime import datetime, timedelta, timezone from pathlib import Path import pytest from python_on_whales import DockerClient from python_on_whales.components.volume.models import VolumeInspectResult from python_on_whales.exceptions import NoSuchVolume from python_on_whales.test_utils import get_all...
all_volumes
assert
variable
tests/python_on_whales/components/test_volume.py
test_list
84
null
gabrieldemarmiesse/python-on-whales
import json from datetime import datetime, timedelta, timezone from pathlib import Path import pytest from python_on_whales import DockerClient from python_on_whales.components.volume.models import VolumeInspectResult from python_on_whales.exceptions import NoSuchVolume from python_on_whales.test_utils import get_all...
Path( "/var/lib/docker/volumes/dodo_letsencrypt_config/_data" )
assert
func_call
tests/python_on_whales/components/test_volume.py
test_load_json
27
null
gabrieldemarmiesse/python-on-whales
import datetime as dt import json import re from pathlib import Path import pytest from python_on_whales import DockerClient from python_on_whales.components.pod.models import PodInspectResult from python_on_whales.exceptions import NoSuchPod from python_on_whales.test_utils import get_all_jsons, random_name def tes...
""
assert
string_literal
tests/python_on_whales/components/test_pod.py
test_create_no_hosts_arg
208
null
gabrieldemarmiesse/python-on-whales
import json import pytest from python_on_whales import docker from python_on_whales.components.task.models import TaskInspectResult from python_on_whales.test_utils import get_all_jsons @pytest.mark.usefixtures("swarm_mode") def test_list_tasks(): service = docker.service.create("busybox", ["sleep", "infinity"])...
service.id
assert
complex_expr
tests/python_on_whales/components/test_task.py
test_list_tasks
26
null
gabrieldemarmiesse/python-on-whales
import json import os import signal import sys import tempfile import time from datetime import datetime, timedelta, timezone from pathlib import Path from typing import Literal, Union from unittest.mock import Mock, patch import pytest import python_on_whales from python_on_whales import DockerClient, Image, docker ...
False
assert
bool_literal
tests/python_on_whales/components/test_container.py
test_create_in_pod
226
null
gabrieldemarmiesse/python-on-whales
from pathlib import Path import pytest from python_on_whales import DockerClient @pytest.mark.usefixtures("swarm_mode") def test_create_delete_config(docker_client: DockerClient, tmp_path: Path): config_file = tmp_path / "config.conf" config_file.write_text("hello world") my_conf = docker_client.config.c...
[my_conf]
assert
collection
tests/python_on_whales/components/test_config.py
test_create_delete_config
20
null
gabrieldemarmiesse/python-on-whales
import json import time from datetime import date, datetime from pathlib import Path from time import sleep import pytest from python_on_whales import DockerClient from python_on_whales.components.system.models import DockerEvent, SystemInfo from python_on_whales.exceptions import DockerException from python_on_whale...
ctr_client.container.list(all=True)
assert
func_call
tests/python_on_whales/components/test_system.py
test_prune_prunes_container
151
null
gabrieldemarmiesse/python-on-whales
import json import pytest from python_on_whales import DockerClient from python_on_whales.components.context.models import ContextInspectResult from python_on_whales.test_utils import get_all_jsons def test_remove_empty_context_list(docker_client: DockerClient): all_contexts = set(docker_client.context.list()) ...
set(docker_client.context.list())
assert
func_call
tests/python_on_whales/components/test_context.py
test_remove_empty_context_list
60
null
gabrieldemarmiesse/python-on-whales
import datetime as dt import json import re from pathlib import Path import pytest from python_on_whales import DockerClient from python_on_whales.components.pod.models import PodInspectResult from python_on_whales.exceptions import NoSuchPod from python_on_whales.test_utils import get_all_jsons, random_name def tes...
"Exited"
assert
string_literal
tests/python_on_whales/components/test_pod.py
test_create_exit_policy_arg
177
null
gabrieldemarmiesse/python-on-whales
import json import shutil import signal import tempfile import time from datetime import datetime, timedelta from os import makedirs, remove from pathlib import Path from typing import Iterable, Tuple, Union from unittest.mock import Mock, patch import pytest import pytz import python_on_whales from python_on_whales ...
6
assert
numeric_literal
tests/python_on_whales/components/test_compose.py
test_docker_compose_up_detach_down_with_scales
316
null
gabrieldemarmiesse/python-on-whales
import json import os import signal import sys import tempfile import time from datetime import datetime, timedelta, timezone from pathlib import Path from typing import Literal, Union from unittest.mock import Mock, patch import pytest import python_on_whales from python_on_whales import DockerClient, Image, docker ...
None
assert
none_literal
tests/python_on_whales/components/test_container.py
test_run_with_random_port
166
null
gabrieldemarmiesse/python-on-whales
from datetime import timedelta import pytest from python_on_whales import DockerClient from python_on_whales.exceptions import NotASwarmManager def test_swarm_join_token_not_swarm_manager(docker_client: DockerClient): with pytest.raises(NotASwarmManager) as e: docker_client.swarm.join_token("manager") ...
str(e.value).lower()
assert
func_call
tests/python_on_whales/components/test_swarm.py
test_swarm_join_token_not_swarm_manager
51
null
gabrieldemarmiesse/python-on-whales
import json import pytest from python_on_whales import DockerClient from python_on_whales.components.context.models import ContextInspectResult from python_on_whales.test_utils import get_all_jsons def test_create_context(docker_client: DockerClient): testname = "testpow" host = "ssh://test@test.domain" ...
host
assert
variable
tests/python_on_whales/components/test_context.py
test_create_context
27
null
gabrieldemarmiesse/python-on-whales
import json import pytest from python_on_whales import DockerClient from python_on_whales.components.node.models import NodeInspectResult from python_on_whales.test_utils import get_all_jsons @pytest.mark.parametrize("json_file", get_all_jsons("nodes")) def test_load_json(json_file): json_as_txt = json_file.read...
4000000001
assert
numeric_literal
tests/python_on_whales/components/test_node.py
test_load_json
23
null
gabrieldemarmiesse/python-on-whales
import json from datetime import datetime, timedelta, timezone from pathlib import Path import pytest from python_on_whales import DockerClient from python_on_whales.components.volume.models import VolumeInspectResult from python_on_whales.exceptions import NoSuchVolume from python_on_whales.test_utils import get_all...
ctr_client.volume.list()
assert
func_call
tests/python_on_whales/components/test_volume.py
test_prune
316
null
gabrieldemarmiesse/python-on-whales
import json import time from datetime import date, datetime from pathlib import Path from time import sleep import pytest from python_on_whales import DockerClient from python_on_whales.components.system.models import DockerEvent, SystemInfo from python_on_whales.exceptions import DockerException from python_on_whale...
info.plugins.volume
assert
complex_expr
tests/python_on_whales/components/test_system.py
test_info
39
null
gabrieldemarmiesse/python-on-whales
import json import shutil import signal import tempfile import time from datetime import datetime, timedelta from os import makedirs, remove from pathlib import Path from typing import Iterable, Tuple, Union from unittest.mock import Mock, patch import pytest import pytz import python_on_whales from python_on_whales ...
1
assert
numeric_literal
tests/python_on_whales/components/test_compose.py
test_docker_compose_down_services
229
null
gabrieldemarmiesse/python-on-whales
import json import pytest from python_on_whales import DockerClient from python_on_whales.components.node.models import NodeInspectResult from python_on_whales.test_utils import get_all_jsons @pytest.mark.usefixtures("swarm_mode") def test_tasks(docker_client: DockerClient): service = docker_client.service.creat...
"running"
assert
string_literal
tests/python_on_whales/components/test_node.py
test_tasks
55
null
gabrieldemarmiesse/python-on-whales
import time from pathlib import Path from typing import Generator import pytest from python_on_whales import DockerClient from python_on_whales.components.stack.cli_wrapper import Stack from python_on_whales.exceptions import NotASwarmManager from python_on_whales.utils import PROJECT_ROOT def stack( docker_clie...
set(docker_client.stack.services("some_stack"))
assert
func_call
tests/python_on_whales/components/test_stack.py
test_services_inspect
32
null
gabrieldemarmiesse/python-on-whales
import json import os import signal import sys import tempfile import time from datetime import datetime, timedelta, timezone from pathlib import Path from typing import Literal, Union from unittest.mock import Mock, patch import pytest import python_on_whales from python_on_whales import DockerClient, Image, docker ...
"�"
assert
string_literal
tests/python_on_whales/components/test_container.py
test_non_unicode_output
1,516
null
gabrieldemarmiesse/python-on-whales
from pathlib import Path import pytest from python_on_whales import DockerClient @pytest.mark.usefixtures("swarm_mode") def test_create_delete_config(docker_client: DockerClient, tmp_path: Path): config_file = tmp_path / "config.conf" config_file.write_text("hello world") my_conf = docker_client.config.c...
my_conf
assert
variable
tests/python_on_whales/components/test_config.py
test_create_delete_config
21
null
gabrieldemarmiesse/python-on-whales
import json import pytest from python_on_whales import DockerClient from python_on_whales.components.context.models import ContextInspectResult from python_on_whales.test_utils import get_all_jsons def test_create_context(docker_client: DockerClient): testname = "testpow" host = "ssh://test@test.domain" ...
testname
assert
variable
tests/python_on_whales/components/test_context.py
test_create_context
26
null
gabrieldemarmiesse/python-on-whales
import contextlib import json from pathlib import Path from typing import Generator from unittest.mock import ANY, MagicMock, Mock, patch import pytest from python_on_whales import DockerClient, docker from python_on_whales.components.image.models import ImageInspectResult from python_on_whales.exceptions import Dock...
[image_tag]
assert
collection
tests/python_on_whales/components/test_image.py
test_save_load
48
null
gabrieldemarmiesse/python-on-whales
import json import tempfile import time import pytest from python_on_whales import DockerClient from python_on_whales.components.service.models import ServiceInspectResult from python_on_whales.exceptions import NoSuchService, NotASwarmManager from python_on_whales.test_utils import get_all_jsons, random_name @pytes...
[my_service]
assert
collection
tests/python_on_whales/components/test_service.py
test_list_filters
64
null
gabrieldemarmiesse/python-on-whales
import json import os import signal import sys import tempfile import time from datetime import datetime, timedelta, timezone from pathlib import Path from typing import Literal, Union from unittest.mock import Mock, patch import pytest import python_on_whales from python_on_whales import DockerClient, Image, docker ...
""
assert
string_literal
tests/python_on_whales/components/test_container.py
test_simple_logs_do_not_follow
367
null
gabrieldemarmiesse/python-on-whales
import time from pathlib import Path from typing import Generator import pytest from python_on_whales import DockerClient from python_on_whales.components.stack.cli_wrapper import Stack from python_on_whales.exceptions import NotASwarmManager from python_on_whales.utils import PROJECT_ROOT def stack( docker_clie...
"running"
assert
string_literal
tests/python_on_whales/components/test_stack.py
test_stack_ps_and_services
54
null
gabrieldemarmiesse/python-on-whales
import json import time from datetime import date, datetime from pathlib import Path from time import sleep import pytest from python_on_whales import DockerClient from python_on_whales.components.system.models import DockerEvent, SystemInfo from python_on_whales.exceptions import DockerException from python_on_whale...
ctr_client.container.list()
assert
func_call
tests/python_on_whales/components/test_system.py
test_prune_prunes_container
152
null
gabrieldemarmiesse/python-on-whales
import json from pathlib import Path from typing import List import pytest from python_on_whales import DockerClient from python_on_whales.components.plugin.models import PluginInspectResult from python_on_whales.test_utils import get_all_jsons test_plugin_name = "vieux/sshfs:latest" def get_all_plugins_jsons() -> ...
plugins_set
assert
variable
tests/python_on_whales/components/test_plugin.py
test_remove_empty_plugin_list
43
null
gabrieldemarmiesse/python-on-whales
import json from pathlib import Path from typing import List import pytest from python_on_whales import DockerClient from python_on_whales.components.plugin.models import PluginInspectResult from python_on_whales.test_utils import get_all_jsons test_plugin_name = "vieux/sshfs:latest" def get_all_plugins_jsons() -> ...
repr(my_plugin)
assert
func_call
tests/python_on_whales/components/test_plugin.py
test_install_plugin_disable_enable
31
null
gabrieldemarmiesse/python-on-whales
import pytest from python_on_whales import docker from python_on_whales.exceptions import DockerException def test_exception_attributes(): with pytest.raises(DockerException) as excinfo: docker.image.tag("wrong::image", "wrong::tag") exception = excinfo.value assert "The command executed was" in ...
0
assert
numeric_literal
tests/python_on_whales/test_exceptions.py
test_exception_attributes
21
null
gabrieldemarmiesse/python-on-whales
import json import os import tarfile from pathlib import Path from unittest.mock import Mock, patch import pytest import python_on_whales.components.buildx.cli_wrapper from python_on_whales import docker from python_on_whales.exceptions import DockerException from python_on_whales.test_utils import set_cache_validity...
None
assert
none_literal
tests/python_on_whales/components/buildx/test_buildx_cli_wrapper.py
test_buildx_build_push_registry
148
null
gabrieldemarmiesse/python-on-whales
import json from contextlib import contextmanager from pathlib import Path from typing import Iterator, Sequence, Tuple import pytest from python_on_whales import DockerClient, docker from python_on_whales.client_config import ClientConfig, ParsingError from python_on_whales.utils import PROJECT_ROOT fake_json_messa...
len( [env_files_input] )
assert
func_call
tests/python_on_whales/test_client_config.py
test_compose_env_files_and_env_file
86
null
gabrieldemarmiesse/python-on-whales
import time from pathlib import Path from typing import Generator import pytest from python_on_whales import DockerClient from python_on_whales.components.stack.cli_wrapper import Stack from python_on_whales.exceptions import NotASwarmManager from python_on_whales.utils import PROJECT_ROOT def stack( docker_clie...
set(stack.services())
assert
func_call
tests/python_on_whales/components/test_stack.py
test_stack_ps_and_services
45
null
gabrieldemarmiesse/python-on-whales
import json import pytest from python_on_whales import DockerClient from python_on_whales.components.context.models import ContextInspectResult from python_on_whales.test_utils import get_all_jsons def test_create_context(docker_client: DockerClient): testname = "testpow" host = "ssh://test@test.domain" ...
description
assert
variable
tests/python_on_whales/components/test_context.py
test_create_context
28
null
gabrieldemarmiesse/python-on-whales
import time from pathlib import Path from typing import Generator import pytest from python_on_whales import DockerClient from python_on_whales.components.stack.cli_wrapper import Stack from python_on_whales.exceptions import NotASwarmManager from python_on_whales.utils import PROJECT_ROOT def stack( docker_clie...
NotASwarmManager)
pytest.raises
variable
tests/python_on_whales/components/test_stack.py
test_deploy_not_swarm_manager
94
null
gabrieldemarmiesse/python-on-whales
import pytest from python_on_whales import docker from python_on_whales.utils import PROJECT_ROOT bake_test_dir = PROJECT_ROOT / "tests/python_on_whales/components/bake_tests" bake_file = bake_test_dir / "docker-bake.hcl" def test_imagetools_create_with_annotations_command_construction(): annotations = { ...
"https://github.com/user/repo"
assert
string_literal
tests/python_on_whales/components/buildx/imagetools/test_imagetools_cli_wrapper.py
test_imagetools_create_with_annotations_command_construction
97
null
gabrieldemarmiesse/python-on-whales
import datetime as dt import json import re from pathlib import Path import pytest from python_on_whales import DockerClient from python_on_whales.components.pod.models import PodInspectResult from python_on_whales.exceptions import NoSuchPod from python_on_whales.test_utils import get_all_jsons, random_name def tes...
"myhost"
assert
string_literal
tests/python_on_whales/components/test_pod.py
test_create_hostname_arg
186
null
gabrieldemarmiesse/python-on-whales
import json import os import signal import sys import tempfile import time from datetime import datetime, timedelta, timezone from pathlib import Path from typing import Literal, Union from unittest.mock import Mock, patch import pytest import python_on_whales from python_on_whales import DockerClient, Image, docker ...
"GMT"
assert
string_literal
tests/python_on_whales/components/test_container.py
test_create_start_with_timezone
265
null
gabrieldemarmiesse/python-on-whales
import json import tempfile import time import pytest from python_on_whales import DockerClient from python_on_whales.components.service.models import ServiceInspectResult from python_on_whales.exceptions import NoSuchService, NotASwarmManager from python_on_whales.test_utils import get_all_jsons, random_name @pytes...
NoSuchService)
pytest.raises
variable
tests/python_on_whales/components/test_service.py
test_some_functions_no_such_service
182
null
gabrieldemarmiesse/python-on-whales
import json import time from datetime import date, datetime from pathlib import Path from time import sleep import pytest from python_on_whales import DockerClient from python_on_whales.components.system.models import DockerEvent, SystemInfo from python_on_whales.exceptions import DockerException from python_on_whale...
10
assert
numeric_literal
tests/python_on_whales/components/test_system.py
test_events
57
null
gabrieldemarmiesse/python-on-whales
import json import pytest from python_on_whales import DockerClient from python_on_whales.components.node.models import NodeInspectResult from python_on_whales.test_utils import get_all_jsons @pytest.mark.usefixtures("swarm_mode") def test_list_nodes(docker_client: DockerClient): nodes = docker_client.node.list(...
1
assert
numeric_literal
tests/python_on_whales/components/test_node.py
test_list_nodes
30
null
gabrieldemarmiesse/python-on-whales
import pytest from python_on_whales import docker from python_on_whales.exceptions import DockerException def test_exception_attributes(): with pytest.raises(DockerException) as excinfo: docker.image.tag("wrong::image", "wrong::tag") exception = excinfo.value assert "The command executed was" in ...
[ "image", "tag", "wrong::image", "wrong::tag", ]
assert
collection
tests/python_on_whales/test_exceptions.py
test_exception_attributes
13
null
gabrieldemarmiesse/python-on-whales
import json import pytest from python_on_whales import DockerClient from python_on_whales.components.context.models import ContextInspectResult from python_on_whales.test_utils import get_all_jsons def test_create_context(docker_client: DockerClient): testname = "testpow" host = "ssh://test@test.domain" ...
docker_client.context.list()
assert
func_call
tests/python_on_whales/components/test_context.py
test_create_context
32
null
gabrieldemarmiesse/python-on-whales
import json import os import signal import sys import tempfile import time from datetime import datetime, timedelta, timezone from pathlib import Path from typing import Literal, Union from unittest.mock import Mock, patch import pytest import python_on_whales from python_on_whales import DockerClient, Image, docker ...
True
assert
bool_literal
tests/python_on_whales/components/test_container.py
test_create_with_systemd_mode
218
null
gabrieldemarmiesse/python-on-whales
import json import shutil import signal import tempfile import time from datetime import datetime, timedelta from os import makedirs, remove from pathlib import Path from typing import Iterable, Tuple, Union from unittest.mock import Mock, patch import pytest import pytz import python_on_whales from python_on_whales ...
8
assert
numeric_literal
tests/python_on_whales/components/test_compose.py
test_docker_compose_up_detach_down_with_scales
323
null
gabrieldemarmiesse/python-on-whales
import time from pathlib import Path from typing import Generator import pytest from python_on_whales import DockerClient from python_on_whales.components.stack.cli_wrapper import Stack from python_on_whales.exceptions import NotASwarmManager from python_on_whales.utils import PROJECT_ROOT def stack( docker_clie...
repr(docker_client.stack.list())
assert
func_call
tests/python_on_whales/components/test_stack.py
test_services_inspect
33
null
gabrieldemarmiesse/python-on-whales
import json import time from datetime import date, datetime from pathlib import Path from time import sleep import pytest from python_on_whales import DockerClient from python_on_whales.components.system.models import DockerEvent, SystemInfo from python_on_whales.exceptions import DockerException from python_on_whale...
DockerException)
pytest.raises
variable
tests/python_on_whales/components/test_system.py
test_prune_raises_exception_on_invalid_arguments
194
null
gabrieldemarmiesse/python-on-whales
import re import time from pathlib import Path import pytest from python_on_whales import DockerClient from python_on_whales.exceptions import DockerException @pytest.mark.skipif(True, reason="It doesn't work in the ci") def test_docker_client_options(docker_client: DockerClient): if docker_client.container.exis...
[]
assert
collection
tests/python_on_whales/test_docker_client.py
test_docker_client_options
59
null
gabrieldemarmiesse/python-on-whales
import json from datetime import datetime, timedelta, timezone from pathlib import Path import pytest from python_on_whales import DockerClient from python_on_whales.components.volume.models import VolumeInspectResult from python_on_whales.exceptions import NoSuchVolume from python_on_whales.test_utils import get_all...
repr(ctr_client.volume.list())
assert
func_call
tests/python_on_whales/components/test_volume.py
test_simple_volume
37
null
gabrieldemarmiesse/python-on-whales
from datetime import timedelta import pytest from python_on_whales import DockerClient from python_on_whales.exceptions import NotASwarmManager @pytest.mark.usefixtures("swarm_mode") def test_swarm_change_certificate_expiry(docker_client: DockerClient): ca = docker_client.swarm.ca(certificate_expiry=timedelta(da...
ca
assert
variable
tests/python_on_whales/components/test_swarm.py
test_swarm_change_certificate_expiry
26
null
gabrieldemarmiesse/python-on-whales
import datetime as dt import json import re from pathlib import Path import pytest from python_on_whales import DockerClient from python_on_whales.components.pod.models import PodInspectResult from python_on_whales.exceptions import NoSuchPod from python_on_whales.test_utils import get_all_jsons, random_name def tes...
output
assert
variable
tests/python_on_whales/components/test_pod.py
test_create_devices_arg
158
null
gabrieldemarmiesse/python-on-whales
import json import pytest from python_on_whales import DockerClient from python_on_whales.components.container.models import ContainerEndpointIPAMConfig from python_on_whales.components.network.cli_wrapper import NetworkInspectResult from python_on_whales.exceptions import DockerException from python_on_whales.test_u...
DockerException)
pytest.raises
variable
tests/python_on_whales/components/test_network.py
test_context_manager
38
null
gabrieldemarmiesse/python-on-whales
import re import time from pathlib import Path import pytest from python_on_whales import DockerClient from python_on_whales.exceptions import DockerException def test_login_logout(docker_client: DockerClient, docker_registry_without_login: str): busybox_image = docker_client.pull("busybox") busybox_image.ta...
(Path.home() / ".docker" / "config.json").read_text()
assert
collection
tests/python_on_whales/test_docker_client.py
test_login_logout
27
null
gabrieldemarmiesse/python-on-whales
from datetime import timedelta import pytest from python_on_whales import DockerClient from python_on_whales.exceptions import NotASwarmManager def test_swarm_join_token_not_swarm_manager(docker_client: DockerClient): with pytest.raises(
NotASwarmManager)
pytest.raises
variable
tests/python_on_whales/components/test_swarm.py
test_swarm_join_token_not_swarm_manager
48
null
gabrieldemarmiesse/python-on-whales
import json import os from typing import Generator import pytest from python_on_whales import DockerClient, Image from python_on_whales.components.manifest.cli_wrapper import ( ManifestList, ManifestListInspectResult, ) from python_on_whales.test_utils import get_all_jsons, random_name def manifest(docker_cl...
repr(platform_variant_manifest.variant)
assert
func_call
tests/python_on_whales/components/test_manifest.py
test_manifest_platform_variant
72
null
gabrieldemarmiesse/python-on-whales
import json import time from datetime import date, datetime from pathlib import Path from time import sleep import pytest from python_on_whales import DockerClient from python_on_whales.components.system.models import DockerEvent, SystemInfo from python_on_whales.exceptions import DockerException from python_on_whale...
1
assert
numeric_literal
tests/python_on_whales/components/test_system.py
test_disk_free
32
null
gabrieldemarmiesse/python-on-whales
from datetime import timedelta import pytest from python_on_whales import DockerClient from python_on_whales.exceptions import NotASwarmManager @pytest.mark.usefixtures("swarm_mode") def test_swarm_change_certificate_expiry(docker_client: DockerClient): ca = docker_client.swarm.ca(certificate_expiry=timedelta(da...
timedelta(days=1)
assert
func_call
tests/python_on_whales/components/test_swarm.py
test_swarm_change_certificate_expiry
25
null
gabrieldemarmiesse/python-on-whales
import json from datetime import datetime, timedelta, timezone from pathlib import Path import pytest from python_on_whales import DockerClient from python_on_whales.components.volume.models import VolumeInspectResult from python_on_whales.exceptions import NoSuchVolume from python_on_whales.test_utils import get_all...
None
assert
none_literal
tests/python_on_whales/components/test_volume.py
test_load_json
30
null
gabrieldemarmiesse/python-on-whales
import json import os import tarfile from pathlib import Path from unittest.mock import Mock, patch import pytest import python_on_whales.components.buildx.cli_wrapper from python_on_whales import docker from python_on_whales.exceptions import DockerException from python_on_whales.test_utils import set_cache_validity...
1000
assert
numeric_literal
tests/python_on_whales/components/buildx/test_buildx_cli_wrapper.py
test_buildx_build
79
null
gabrieldemarmiesse/python-on-whales
import json import shutil import signal import tempfile import time from datetime import datetime, timedelta from os import makedirs, remove from pathlib import Path from typing import Iterable, Tuple, Union from unittest.mock import Mock, patch import pytest import pytz import python_on_whales from python_on_whales ...
2
assert
numeric_literal
tests/python_on_whales/components/test_compose.py
test_docker_compose_down_services
225
null
gabrieldemarmiesse/python-on-whales
import python_on_whales.utils def test_environment_variables_propagation(monkeypatch): monkeypatch.setenv("SOME_VARIABLE", "dododada") stdout = python_on_whales.utils.run( ["bash", "-c", "echo $SOME_VARIABLE && echo $OTHER_VARIABLE"], capture_stdout=True, env={"OTHER_VARIABLE": "dudu"}...
"dododada\ndudu"
assert
string_literal
tests/python_on_whales/test_utils.py
test_environment_variables_propagation
12
null
gabrieldemarmiesse/python-on-whales
import json import os import signal import sys import tempfile import time from datetime import datetime, timedelta, timezone from pathlib import Path from typing import Literal, Union from unittest.mock import Mock, patch import pytest import python_on_whales from python_on_whales import DockerClient, Image, docker ...
130
assert
numeric_literal
tests/python_on_whales/components/test_container.py
test_kill_signal
558
null
gabrieldemarmiesse/python-on-whales
import json from contextlib import contextmanager from pathlib import Path from typing import Iterator, Sequence, Tuple import pytest from python_on_whales import DockerClient, docker from python_on_whales.client_config import ClientConfig, ParsingError from python_on_whales.utils import PROJECT_ROOT fake_json_messa...
env_files_input
assert
variable
tests/python_on_whales/test_client_config.py
test_compose_env_files_and_env_file
91
null
gabrieldemarmiesse/python-on-whales
import pytest from python_on_whales import docker from python_on_whales.utils import PROJECT_ROOT bake_test_dir = PROJECT_ROOT / "tests/python_on_whales/components/bake_tests" bake_file = bake_test_dir / "docker-bake.hcl" def test_imagetools_create_annotations_type_validation(): with pytest.raises(
TypeError)
pytest.raises
variable
tests/python_on_whales/components/buildx/imagetools/test_imagetools_cli_wrapper.py
test_imagetools_create_annotations_type_validation
76
null
gabrieldemarmiesse/python-on-whales
import json import tempfile import time import pytest from python_on_whales import DockerClient from python_on_whales.components.service.models import ServiceInspectResult from python_on_whales.exceptions import NoSuchService, NotASwarmManager from python_on_whales.test_utils import get_all_jsons, random_name @pytes...
RuntimeError)
pytest.raises
variable
tests/python_on_whales/components/test_service.py
test_context_manager
100
null
gabrieldemarmiesse/python-on-whales
import json import time from datetime import date, datetime from pathlib import Path from time import sleep import pytest from python_on_whales import DockerClient from python_on_whales.components.system.models import DockerEvent, SystemInfo from python_on_whales.exceptions import DockerException from python_on_whale...
ctr_client.image.list()
assert
func_call
tests/python_on_whales/components/test_system.py
test_prune_prunes_image
121
null
gabrieldemarmiesse/python-on-whales
import json from contextlib import contextmanager from pathlib import Path from typing import Iterator, Sequence, Tuple import pytest from python_on_whales import DockerClient, docker from python_on_whales.client_config import ClientConfig, ParsingError from python_on_whales.utils import PROJECT_ROOT fake_json_messa...
1
assert
numeric_literal
tests/python_on_whales/test_client_config.py
test_compose_env_file
49
null
gabrieldemarmiesse/python-on-whales
import json import tempfile import time import pytest from python_on_whales import DockerClient from python_on_whales.components.service.models import ServiceInspectResult from python_on_whales.exceptions import NoSuchService, NotASwarmManager from python_on_whales.test_utils import get_all_jsons, random_name def te...
NotASwarmManager)
pytest.raises
variable
tests/python_on_whales/components/test_service.py
test_create_not_swarm_manager
193
null
gabrieldemarmiesse/python-on-whales
import json import time from datetime import date, datetime from pathlib import Path from time import sleep import pytest from python_on_whales import DockerClient from python_on_whales.components.system.models import DockerEvent, SystemInfo from python_on_whales.exceptions import DockerException from python_on_whale...
5
assert
numeric_literal
tests/python_on_whales/components/test_system.py
test_events
68
null
gabrieldemarmiesse/python-on-whales
import json import tempfile import time import pytest from python_on_whales import DockerClient from python_on_whales.components.service.models import ServiceInspectResult from python_on_whales.exceptions import NoSuchService, NotASwarmManager from python_on_whales.test_utils import get_all_jsons, random_name @pytes...
"shutdown"
assert
string_literal
tests/python_on_whales/components/test_service.py
test_service_restart
123
null
gabrieldemarmiesse/python-on-whales
import time from pathlib import Path from typing import Generator import pytest from python_on_whales import DockerClient from python_on_whales.components.stack.cli_wrapper import Stack from python_on_whales.exceptions import NotASwarmManager from python_on_whales.utils import PROJECT_ROOT def stack( docker_clie...
0
assert
numeric_literal
tests/python_on_whales/components/test_stack.py
test_stack_ps_and_services
52
null
gabrieldemarmiesse/python-on-whales
import pytest from python_on_whales import docker from python_on_whales.exceptions import DockerException def test_exception_attributes(): with pytest.raises(DockerException) as excinfo: docker.image.tag("wrong::image", "wrong::tag") exception = excinfo.value assert "The command executed was" in ...
exception.stderr
assert
complex_expr
tests/python_on_whales/test_exceptions.py
test_exception_attributes
23
null
gabrieldemarmiesse/python-on-whales
import json import tempfile import time import pytest from python_on_whales import DockerClient from python_on_whales.components.service.models import ServiceInspectResult from python_on_whales.exceptions import NoSuchService, NotASwarmManager from python_on_whales.test_utils import get_all_jsons, random_name @pytes...
0
assert
numeric_literal
tests/python_on_whales/components/test_service.py
test_tasks
25
null
gabrieldemarmiesse/python-on-whales
import json import os import tarfile from pathlib import Path from unittest.mock import Mock, patch import pytest import python_on_whales.components.buildx.cli_wrapper from python_on_whales import docker from python_on_whales.exceptions import DockerException from python_on_whales.test_utils import set_cache_validity...
2
assert
numeric_literal
tests/python_on_whales/components/buildx/test_buildx_cli_wrapper.py
test_prune
838
null
gabrieldemarmiesse/python-on-whales
import json import shutil import signal import tempfile import time from datetime import datetime, timedelta from os import makedirs, remove from pathlib import Path from typing import Iterable, Tuple, Union from unittest.mock import Mock, patch import pytest import pytz import python_on_whales from python_on_whales ...
3
assert
numeric_literal
tests/python_on_whales/components/test_compose.py
test_docker_compose_build_stream
156
null
gabrieldemarmiesse/python-on-whales
import json import pytest from python_on_whales import DockerClient from python_on_whales.components.node.models import NodeInspectResult from python_on_whales.test_utils import get_all_jsons @pytest.mark.usefixtures("swarm_mode") def test_list_tasks_node(docker_client: DockerClient): with docker_client.service....
set(docker_client.service.ps(my_service))
assert
func_call
tests/python_on_whales/components/test_node.py
test_list_tasks_node
63
null
gabrieldemarmiesse/python-on-whales
import json import os from typing import Generator import pytest from python_on_whales import DockerClient, Image from python_on_whales.components.manifest.cli_wrapper import ( ManifestList, ManifestListInspectResult, ) from python_on_whales.test_utils import get_all_jsons, random_name def manifest(docker_cl...
repr(platform_variant_manifest.os)
assert
func_call
tests/python_on_whales/components/test_manifest.py
test_manifest_platform_variant
70
null
gabrieldemarmiesse/python-on-whales
import json import os import tarfile from pathlib import Path from unittest.mock import Mock, patch import pytest import python_on_whales.components.buildx.cli_wrapper from python_on_whales import docker from python_on_whales.exceptions import DockerException from python_on_whales.test_utils import set_cache_validity...
1
assert
numeric_literal
tests/python_on_whales/components/buildx/test_buildx_cli_wrapper.py
test_buildx_build_streaming_logs
86
null
gabrieldemarmiesse/python-on-whales
import datetime as dt import json import re from pathlib import Path import pytest from python_on_whales import DockerClient from python_on_whales.components.pod.models import PodInspectResult from python_on_whales.exceptions import NoSuchPod from python_on_whales.test_utils import get_all_jsons, random_name def tes...
pod2.id
assert
complex_expr
tests/python_on_whales/components/test_pod.py
test_create_replace_arg
224
null