repo_id
stringclasses
400 values
commit_sha
stringclasses
400 values
commit_index
int32
0
951
in_repo_split
stringclasses
1 value
cross_repo_split
stringclasses
1 value
test_file
stringlengths
7
121
test_function
stringlengths
1
108
assertion_type
stringclasses
32 values
difficulty
stringclasses
8 values
context_lines
int32
3
600
prefix
large_stringlengths
44
113k
target
large_stringlengths
1
498
anchor_sha
stringclasses
400 values
anchor_index
int32
0
951
qna_source
stringclasses
1 value
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_models/test_heads.py
test_decode_head
assert
none_literal
84
from unittest.mock import patch import pytest import torch from mmcv.cnn import ConvModule, DepthwiseSeparableConvModule from mmcv.utils import ConfigDict from mmcv.utils.parrots_wrapper import SyncBatchNorm from mmseg.models.decode_heads import (ANNHead, ASPPHead, CCHead, DAHead, ...
None
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_models/test_heads.py
test_dnl_head
assert
numeric_literal
40
from unittest.mock import patch import pytest import torch from mmcv.cnn import ConvModule, DepthwiseSeparableConvModule from mmcv.utils import ConfigDict from mmcv.utils.parrots_wrapper import SyncBatchNorm from mmseg.models.decode_heads import (ANNHead, ASPPHead, CCHead, DAHead, ...
0.05
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_models/test_losses.py
test_accuracy
assert
numeric_literal
14
import numpy as np import pytest import torch from mmseg.models.losses import Accuracy, reduce_loss, weight_reduce_loss def test_accuracy(): # test for empty pred pred = torch.empty(0, 4) label = torch.empty(0) accuracy = Accuracy(topk=1) acc = accuracy(pred, label) assert acc.item() ==
0
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_models/test_losses.py
test_accuracy
assert
numeric_literal
29
import numpy as np import pytest import torch from mmseg.models.losses import Accuracy, reduce_loss, weight_reduce_loss def test_accuracy(): # test for empty pred pred = torch.empty(0, 4) label = torch.empty(0) accuracy = Accuracy(topk=1) acc = accuracy(pred, label) assert acc.item() == 0 ...
40
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_models/test_losses.py
test_accuracy
assert
numeric_literal
23
import numpy as np import pytest import torch from mmseg.models.losses import Accuracy, reduce_loss, weight_reduce_loss def test_accuracy(): # test for empty pred pred = torch.empty(0, 4) label = torch.empty(0) accuracy = Accuracy(topk=1) acc = accuracy(pred, label) assert acc.item() == 0 ...
100
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_models/test_losses.py
test_utils
assert
variable
15
import numpy as np import pytest import torch from mmseg.models.losses import Accuracy, reduce_loss, weight_reduce_loss def test_utils(): loss = torch.rand(1, 3, 4, 4) weight = torch.zeros(1, 3, 4, 4) weight[:, :, :2, :2] = 1 # test reduce_loss() reduced = reduce_loss(loss, 'none') assert re...
loss
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_models/test_losses.py
test_utils
assert_*
variable
29
import numpy as np import pytest import torch from mmseg.models.losses import Accuracy, reduce_loss, weight_reduce_loss def test_utils(): loss = torch.rand(1, 3, 4, 4) weight = torch.zeros(1, 3, 4, 4) weight[:, :, :2, :2] = 1 # test reduce_loss() reduced = reduce_loss(loss, 'none') assert red...
target)
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_models/test_losses.py
test_utils
assert_*
func_call
21
import numpy as np import pytest import torch from mmseg.models.losses import Accuracy, reduce_loss, weight_reduce_loss def test_utils(): loss = torch.rand(1, 3, 4, 4) weight = torch.zeros(1, 3, 4, 4) weight[:, :, :2, :2] = 1 # test reduce_loss() reduced = reduce_loss(loss, 'none') assert red...
loss.sum())
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_models/test_losses.py
test_utils
assert_*
func_call
18
import numpy as np import pytest import torch from mmseg.models.losses import Accuracy, reduce_loss, weight_reduce_loss def test_utils(): loss = torch.rand(1, 3, 4, 4) weight = torch.zeros(1, 3, 4, 4) weight[:, :, :2, :2] = 1 # test reduce_loss() reduced = reduce_loss(loss, 'none') assert red...
loss.mean())
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_models/test_losses.py
test_ce_loss
pytest.raises
variable
12
import numpy as np import pytest import torch from mmseg.models.losses import Accuracy, reduce_loss, weight_reduce_loss def test_ce_loss(): from mmseg.models import build_loss # use_mask and use_sigmoid cannot be true at the same time with pytest.raises(
AssertionError)
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_models/test_necks.py
test_fpn
assert
func_call
18
import torch from mmseg.models import FPN def test_fpn(): in_channels = [256, 512, 1024, 2048] inputs = [ torch.randn(1, c, 56 // 2**i, 56 // 2**i) for i, c in enumerate(in_channels) ] fpn = FPN(in_channels, 256, len(in_channels)) outputs = fpn(inputs) assert outputs[0].shape ...
torch.Size([1, 256, 7, 7])
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_models/test_necks.py
test_fpn
assert
func_call
15
import torch from mmseg.models import FPN def test_fpn(): in_channels = [256, 512, 1024, 2048] inputs = [ torch.randn(1, c, 56 // 2**i, 56 // 2**i) for i, c in enumerate(in_channels) ] fpn = FPN(in_channels, 256, len(in_channels)) outputs = fpn(inputs) assert outputs[0].shape...
torch.Size([1, 256, 56, 56])
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_models/test_necks.py
test_fpn
assert
func_call
16
import torch from mmseg.models import FPN def test_fpn(): in_channels = [256, 512, 1024, 2048] inputs = [ torch.randn(1, c, 56 // 2**i, 56 // 2**i) for i, c in enumerate(in_channels) ] fpn = FPN(in_channels, 256, len(in_channels)) outputs = fpn(inputs) assert outputs[0].shape ...
torch.Size([1, 256, 28, 28])
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_models/test_necks.py
test_fpn
assert
func_call
17
import torch from mmseg.models import FPN def test_fpn(): in_channels = [256, 512, 1024, 2048] inputs = [ torch.randn(1, c, 56 // 2**i, 56 // 2**i) for i, c in enumerate(in_channels) ] fpn = FPN(in_channels, 256, len(in_channels)) outputs = fpn(inputs) assert outputs[0].shape ...
torch.Size([1, 256, 14, 14])
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_sampler.py
test_ohem_sampler
assert
numeric_literal
28
import pytest import torch from mmseg.core import OHEMPixelSampler from mmseg.models.decode_heads import FCNHead def _context_for_ohem(): return FCNHead(in_channels=32, channels=16, num_classes=19) def test_ohem_sampler(): with pytest.raises(AssertionError): # seg_logit and seg_label must be of the ...
200
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_sampler.py
test_ohem_sampler
pytest.raises
variable
13
import pytest import torch from mmseg.core import OHEMPixelSampler from mmseg.models.decode_heads import FCNHead def _context_for_ohem(): return FCNHead(in_channels=32, channels=16, num_classes=19) def test_ohem_sampler(): with pytest.raises(
AssertionError)
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_sampler.py
test_ohem_sampler
assert
complex_expr
26
import pytest import torch from mmseg.core import OHEMPixelSampler from mmseg.models.decode_heads import FCNHead def _context_for_ohem(): return FCNHead(in_channels=32, channels=16, num_classes=19) def test_ohem_sampler(): with pytest.raises(AssertionError): # seg_logit and seg_label must be of the ...
seg_logit.shape[0]
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_utils/test_inverted_residual_module.py
test_inv_residual
assert
numeric_literal
17
import pytest import torch from mmseg.models.utils import InvertedResidual def test_inv_residual(): with pytest.raises(AssertionError): # test stride assertion. InvertedResidual(32, 32, 3, 4) # test default config with res connection. # set expand_ratio = 4, stride = 1 and inp=oup. in...
0
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_utils/test_inverted_residual_module.py
test_inv_residual
assert
numeric_literal
19
import pytest import torch from mmseg.models.utils import InvertedResidual def test_inv_residual(): with pytest.raises(AssertionError): # test stride assertion. InvertedResidual(32, 32, 3, 4) # test default config with res connection. # set expand_ratio = 4, stride = 1 and inp=oup. in...
1
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_utils/test_inverted_residual_module.py
test_inv_residual
assert
collection
16
import pytest import torch from mmseg.models.utils import InvertedResidual def test_inv_residual(): with pytest.raises(AssertionError): # test stride assertion. InvertedResidual(32, 32, 3, 4) # test default config with res connection. # set expand_ratio = 4, stride = 1 and inp=oup. in...
(1, 1)
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
fudan-zvg/SETR
b2b23939450f5c96961c73182b900df75b43fae0
1
train
train
tests/test_utils/test_inverted_residual_module.py
test_inv_residual
assert
collection
18
import pytest import torch from mmseg.models.utils import InvertedResidual def test_inv_residual(): with pytest.raises(AssertionError): # test stride assertion. InvertedResidual(32, 32, 3, 4) # test default config with res connection. # set expand_ratio = 4, stride = 1 and inp=oup. in...
(3, 3)
b2b23939450f5c96961c73182b900df75b43fae0
1
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/buildx/imagetools/test_imagetools_cli_wrapper.py
test_imagetools_inspect_single_image
assert
numeric_literal
12
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_inspect_single_image(): a = docker.buildx.imagetools.inspect( "python@sha256:b...
2
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/buildx/test_buildx_cli_wrapper.py
test_buildx_build_streaming_logs
assert
numeric_literal
65
import os import tarfile import pytest from python_on_whales import docker from python_on_whales.components.buildx.models import BuilderInspectResult from python_on_whales.exceptions import DockerException from python_on_whales.test_utils import set_cache_validity_period from python_on_whales.utils import PROJECT_ROO...
1
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/buildx/test_buildx_cli_wrapper.py
test_buildx_build_streaming_logs
assert
string_literal
67
import os import tarfile import pytest from python_on_whales import docker from python_on_whales.components.buildx.models import BuilderInspectResult from python_on_whales.exceptions import DockerException from python_on_whales.test_utils import set_cache_validity_period from python_on_whales.utils import PROJECT_ROO...
""
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/buildx/test_buildx_cli_wrapper.py
test_builder_inspect_result_from_string
assert
collection
74
import os import tarfile import pytest from python_on_whales import docker from python_on_whales.components.buildx.models import BuilderInspectResult from python_on_whales.exceptions import DockerException from python_on_whales.test_utils import set_cache_validity_period from python_on_whales.utils import PROJECT_ROO...
[]
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/buildx/test_buildx_cli_wrapper.py
test_buildx_build
assert
numeric_literal
65
import os import tarfile import pytest from python_on_whales import docker from python_on_whales.components.buildx.models import BuilderInspectResult from python_on_whales.exceptions import DockerException from python_on_whales.test_utils import set_cache_validity_period from python_on_whales.utils import PROJECT_ROO...
1000
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/buildx/test_buildx_cli_wrapper.py
test_buildx_build_push_registry
assert
none_literal
68
import os import tarfile import pytest from python_on_whales import docker from python_on_whales.components.buildx.models import BuilderInspectResult from python_on_whales.exceptions import DockerException from python_on_whales.test_utils import set_cache_validity_period from python_on_whales.utils import PROJECT_ROO...
None
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/buildx/test_buildx_cli_wrapper.py
test_list
assert
variable
77
import os import tarfile import pytest from python_on_whales import docker from python_on_whales.components.buildx.models import BuilderInspectResult from python_on_whales.exceptions import DockerException from python_on_whales.test_utils import set_cache_validity_period from python_on_whales.utils import PROJECT_ROO...
builders
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/buildx/test_buildx_cli_wrapper.py
test_builder_inspect_result_platforms_from_string
assert
string_literal
73
import os import tarfile import pytest from python_on_whales import docker from python_on_whales.components.buildx.models import BuilderInspectResult from python_on_whales.exceptions import DockerException from python_on_whales.test_utils import set_cache_validity_period from python_on_whales.utils import PROJECT_ROO...
"running"
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/buildx/test_buildx_cli_wrapper.py
test_buildx_build_streaming_logs_with_decode_error_handling
assert
complex_expr
73
import os import tarfile import pytest from python_on_whales import docker from python_on_whales.components.buildx.models import BuilderInspectResult from python_on_whales.exceptions import DockerException from python_on_whales.test_utils import set_cache_validity_period from python_on_whales.utils import PROJECT_ROO...
output[-1]
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/buildx/test_buildx_cli_wrapper.py
test_builder_inspect_result_from_string
assert
string_literal
73
import os import tarfile import pytest from python_on_whales import docker from python_on_whales.components.buildx.models import BuilderInspectResult from python_on_whales.exceptions import DockerException from python_on_whales.test_utils import set_cache_validity_period from python_on_whales.utils import PROJECT_ROO...
"inactive"
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_compose.py
test_docker_compose_build_stream
assert
numeric_literal
37
import json import signal import tempfile import time from datetime import datetime, timedelta from os import makedirs, remove from pathlib import Path import pytest import pytz import python_on_whales from python_on_whales import DockerClient, DockerException from python_on_whales.components.compose.models import Co...
3
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_compose.py
test_docker_compose_up_detach_down_with_scales
assert
numeric_literal
41
import json import signal import tempfile import time from datetime import datetime, timedelta from os import makedirs, remove from pathlib import Path import pytest import pytz import python_on_whales from python_on_whales import DockerClient, DockerException from python_on_whales.components.compose.models import Co...
6
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_compose.py
test_docker_compose_up_detach_down_with_scales
assert
numeric_literal
48
import json import signal import tempfile import time from datetime import datetime, timedelta from os import makedirs, remove from pathlib import Path import pytest import pytz import python_on_whales from python_on_whales import DockerClient, DockerException from python_on_whales.components.compose.models import Co...
8
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_compose.py
test_docker_compose_create_stream_down
assert
numeric_literal
40
import json import signal import tempfile import time from datetime import datetime, timedelta from os import makedirs, remove from pathlib import Path import pytest import pytz import python_on_whales from python_on_whales import DockerClient, DockerException from python_on_whales.components.compose.models import Co...
2
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_compose.py
test_config_complexe_compose
assert
numeric_literal
67
import json import signal import tempfile import time from datetime import datetime, timedelta from os import makedirs, remove from pathlib import Path import pytest import pytz import python_on_whales from python_on_whales import DockerClient, DockerException from python_on_whales.components.compose.models import Co...
1
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_compose.py
test_config_complexe_compose
assert
numeric_literal
72
import json import signal import tempfile import time from datetime import datetime, timedelta from os import makedirs, remove from pathlib import Path import pytest import pytz import python_on_whales from python_on_whales import DockerClient, DockerException from python_on_whales.components.compose.models import Co...
4
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_compose.py
test_compose_logs_follow
assert
numeric_literal
65
import json import signal import tempfile import time from datetime import datetime, timedelta from os import makedirs, remove from pathlib import Path import pytest import pytz import python_on_whales from python_on_whales import DockerClient, DockerException from python_on_whales.components.compose.models import Co...
5
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_compose.py
test_compose_ls_project_multiple_statuses
assert
numeric_literal
57
import json import signal import tempfile import time from datetime import datetime, timedelta from os import makedirs, remove from pathlib import Path import pytest import pytz import python_on_whales from python_on_whales import DockerClient, DockerException from python_on_whales.components.compose.models import Co...
0
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_compose.py
test_docker_compose_up_down
assert
collection
46
import json import signal import tempfile import time from datetime import datetime, timedelta from os import makedirs, remove from pathlib import Path import pytest import pytz import python_on_whales from python_on_whales import DockerClient, DockerException from python_on_whales.components.compose.models import Co...
[]
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_config.py
test_list_configs
assert
collection
8
import pytest from python_on_whales import docker @pytest.mark.usefixtures("swarm_mode") def test_list_configs(): assert docker.config.list() ==
[]
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_config.py
test_create_delete_config
assert
variable
14
import pytest from python_on_whales import docker @pytest.mark.usefixtures("swarm_mode") def test_create_delete_config(tmp_path): config_file = tmp_path / "config.conf" config_file.write_text("hello world") my_conf = docker.config.create("my_conf", config_file) with my_conf: assert my_conf.spe...
my_conf
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_config.py
test_create_delete_config
assert
string_literal
12
import pytest from python_on_whales import docker @pytest.mark.usefixtures("swarm_mode") def test_create_delete_config(tmp_path): config_file = tmp_path / "config.conf" config_file.write_text("hello world") my_conf = docker.config.create("my_conf", config_file) with my_conf: assert my_conf.sp...
"my_conf"
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_config.py
test_create_delete_config
assert
collection
13
import pytest from python_on_whales import docker @pytest.mark.usefixtures("swarm_mode") def test_create_delete_config(tmp_path): config_file = tmp_path / "config.conf" config_file.write_text("hello world") my_conf = docker.config.create("my_conf", config_file) with my_conf: assert my_conf.spe...
[my_conf]
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_container.py
test_container_state
assert
numeric_literal
42
import json 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 Image, docker from python_on_whales.co...
0
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_container.py
test_wait_single_container
assert
numeric_literal
42
import json 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 Image, docker from python_on_whales.co...
8
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_container.py
test_docker_stats
assert
numeric_literal
45
import json 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 Image, docker from python_on_whales.co...
5
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_container.py
test_docker_stats_container
assert
numeric_literal
41
import json 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 Image, docker from python_on_whales.co...
1
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_container.py
test_docker_stats_cli_empty_selection
assert
collection
38
import json 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 Image, docker from python_on_whales.co...
[]
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_container.py
test_simple_logs_do_not_follow
assert
string_literal
42
import json 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 Image, docker from python_on_whales.co...
""
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_container.py
test_kill_signal
assert
numeric_literal
43
import json 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 Image, docker from python_on_whales.co...
130
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_container.py
test_load_stats_json
assert
numeric_literal
41
import json 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 Image, docker from python_on_whales.co...
100
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_container.py
test_name
assert
variable
40
import json 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 Image, docker from python_on_whales.co...
name
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_container.py
test_container_run_with_random_port
assert
none_literal
46
import json 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 Image, docker from python_on_whales.co...
None
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_container.py
test_simple_command
assert
variable
26
import json 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 Image, docker from python_on_whales.co...
output
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_container.py
test_exact_output
assert
string_literal
29
import json 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 Image, docker from python_on_whales.co...
"dodo"
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_container.py
test_exec_env
assert
string_literal
41
import json 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 Image, docker from python_on_whales.co...
"dada"
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_container.py
test_export_file
assert
numeric_literal
43
import json 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 Image, docker from python_on_whales.co...
10_000
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_context.py
test_inpect
assert
variable
15
import json import pytest from python_on_whales import docker from python_on_whales.components.context.models import ContextInspectResult from python_on_whales.test_utils import get_all_jsons def test_inpect(): default_context = docker.context.inspect() assert default_context.name == "default" assert def...
b
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_context.py
test_create_context
assert
variable
20
import json import pytest from python_on_whales import docker from python_on_whales.components.context.models import ContextInspectResult from python_on_whales.test_utils import get_all_jsons def test_create_context(): testname = "testpow" host = "ssh://test@test.domain" description = "Python on whales t...
host
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_context.py
test_create_context
assert
variable
19
import json import pytest from python_on_whales import docker from python_on_whales.components.context.models import ContextInspectResult from python_on_whales.test_utils import get_all_jsons def test_create_context(): testname = "testpow" host = "ssh://test@test.domain" description = "Python on whales t...
testname
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_context.py
test_inpect
assert
string_literal
12
import json import pytest from python_on_whales import docker from python_on_whales.components.context.models import ContextInspectResult from python_on_whales.test_utils import get_all_jsons def test_inpect(): default_context = docker.context.inspect() assert default_context.name ==
"default"
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_context.py
test_create_context
assert
variable
21
import json import pytest from python_on_whales import docker from python_on_whales.components.context.models import ContextInspectResult from python_on_whales.test_utils import get_all_jsons def test_create_context(): testname = "testpow" host = "ssh://test@test.domain" description = "Python on whales t...
description
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_context.py
test_create_context
assert
variable
23
import json import pytest from python_on_whales import docker from python_on_whales.components.context.models import ContextInspectResult from python_on_whales.test_utils import get_all_jsons def test_create_context(): testname = "testpow" host = "ssh://test@test.domain" description = "Python on whales t...
all_contexts_before
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_context.py
test_create_context
assert
func_call
25
import json import pytest from python_on_whales import docker from python_on_whales.components.context.models import ContextInspectResult from python_on_whales.test_utils import get_all_jsons def test_create_context(): testname = "testpow" host = "ssh://test@test.domain" description = "Python on whales t...
docker.context.list()
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_context.py
test_remove_empty_context_list
assert
func_call
13
import json import pytest from python_on_whales import docker 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(): all_contexts = set(docker.context.list()) docker.context.remove([]) assert...
set(docker.context.list())
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_context.py
test_inpect
assert
func_call
13
import json import pytest from python_on_whales import docker from python_on_whales.components.context.models import ContextInspectResult from python_on_whales.test_utils import get_all_jsons def test_inpect(): default_context = docker.context.inspect() assert default_context.name == "default" assert de...
docker.context.inspect("default")
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_context.py
test_list_contexts
assert
collection
11
import json import pytest from python_on_whales import docker from python_on_whales.components.context.models import ContextInspectResult from python_on_whales.test_utils import get_all_jsons def test_list_contexts(): assert docker.context.list() ==
[docker.context.inspect("default")]
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_image.py
test_save_iterator_bytes
assert
numeric_literal
23
import contextlib import json from pathlib import Path from unittest.mock import 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 DockerException, NoSuchImage from pyth...
0
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_image.py
test_save_load
assert
variable
33
import contextlib import json from pathlib import Path from unittest.mock import 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 DockerException, NoSuchImage from pyth...
image_tags
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_image.py
test_no_such_image_inspect
pytest.raises
variable
21
import contextlib import json from pathlib import Path from unittest.mock import 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 DockerException, NoSuchImage from pyth...
NoSuchImage)
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_image.py
test_no_such_image_inspect
assert
func_call
24
import contextlib import json from pathlib import Path from unittest.mock import 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 DockerException, NoSuchImage from pyth...
str(err.value)
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_image.py
test_filter_when_listing_old_signature
assert
variable
21
import contextlib import json from pathlib import Path from unittest.mock import 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 DockerException, NoSuchImage from pyth...
warning_message
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_manifest.py
test_manifest_annotate
assert
string_literal
41
import json import os import pytest from python_on_whales import docker from python_on_whales.components.manifest.cli_wrapper import ( ManifestList, ManifestListInspectResult, ) from python_on_whales.test_utils import get_all_jsons, random_name def with_manifest(): manifest_name = random_name() # uti...
"linux"
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_manifest.py
test_manifest_annotate
assert
string_literal
42
import json import os import pytest from python_on_whales import docker from python_on_whales.components.manifest.cli_wrapper import ( ManifestList, ManifestListInspectResult, ) from python_on_whales.test_utils import get_all_jsons, random_name def with_manifest(): manifest_name = random_name() # uti...
"arm64"
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_manifest.py
test_manifest_platform_variant
assert
func_call
34
import json import os import pytest from python_on_whales import docker from python_on_whales.components.manifest.cli_wrapper import ( ManifestList, ManifestListInspectResult, ) from python_on_whales.test_utils import get_all_jsons, random_name def with_manifest(): manifest_name = random_name() # uti...
repr(with_platform_variant_manifest.os)
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_manifest.py
test_manifest_platform_variant
assert
func_call
36
import json import os import pytest from python_on_whales import docker from python_on_whales.components.manifest.cli_wrapper import ( ManifestList, ManifestListInspectResult, ) from python_on_whales.test_utils import get_all_jsons, random_name def with_manifest(): manifest_name = random_name() # uti...
repr(with_platform_variant_manifest.variant)
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_manifest.py
test_manifest_platform_variant
assert
func_call
35
import json import os import pytest from python_on_whales import docker from python_on_whales.components.manifest.cli_wrapper import ( ManifestList, ManifestListInspectResult, ) from python_on_whales.test_utils import get_all_jsons, random_name def with_manifest(): manifest_name = random_name() # uti...
repr(with_platform_variant_manifest.architecture)
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_network.py
test_swarm_service_create
assert
numeric_literal
19
import json import pytest from python_on_whales import docker from python_on_whales.components.network.cli_wrapper import NetworkInspectResult from python_on_whales.exceptions import DockerException from python_on_whales.test_utils import get_all_jsons, random_name @pytest.mark.usefixtures("swarm_mode") def test_swa...
2
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_network.py
test_network_create_with_labels
assert
variable
17
import json import pytest from python_on_whales import docker from python_on_whales.components.network.cli_wrapper import NetworkInspectResult from python_on_whales.exceptions import DockerException from python_on_whales.test_utils import get_all_jsons, random_name def test_network_create_with_labels(): my_name ...
value
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_network.py
test_network_create_remove
assert
variable
14
import json import pytest from python_on_whales import docker from python_on_whales.components.network.cli_wrapper import NetworkInspectResult from python_on_whales.exceptions import DockerException from python_on_whales.test_utils import get_all_jsons, random_name def test_network_create_remove(): my_name = ran...
my_name
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_network.py
test_context_manager
pytest.raises
variable
12
import json import pytest from python_on_whales import docker from python_on_whales.components.network.cli_wrapper import NetworkInspectResult from python_on_whales.exceptions import DockerException from python_on_whales.test_utils import get_all_jsons, random_name def test_context_manager(): with pytest.raises...
DockerException)
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_network.py
test_context_manager
assert
func_call
23
import json import pytest from python_on_whales import docker from python_on_whales.components.network.cli_wrapper import NetworkInspectResult from python_on_whales.exceptions import DockerException from python_on_whales.test_utils import get_all_jsons, random_name def test_context_manager(): with pytest.raises(...
docker.network.list()
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_network.py
test_remove_nothing
assert
func_call
14
import json import pytest from python_on_whales import docker from python_on_whales.components.network.cli_wrapper import NetworkInspectResult from python_on_whales.exceptions import DockerException from python_on_whales.test_utils import get_all_jsons, random_name def test_remove_nothing(): all_neworks = set(do...
set(docker.network.list())
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_node.py
test_list_nodes
assert
numeric_literal
14
import json import pytest from python_on_whales import docker 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(): nodes = docker.node.list() assert nodes[0].id[:12] in repr(no...
1
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_node.py
test_tasks
assert
numeric_literal
16
import json import pytest from python_on_whales import docker 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(): service = docker.service.create("busybox", ["sleep", "infinity"]) ...
0
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_node.py
test_list_tasks_node
assert
collection
13
import json import pytest from python_on_whales import docker 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(): with docker.service.create("busybox", ["sleep", "infinity"])...
[]
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_node.py
test_add_label
assert
string_literal
14
import json import pytest from python_on_whales import docker 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_add_label(): nodes = docker.node.list() nodes[0].update(labels_add={"foo": ...
"bar"
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_node.py
test_load_json
assert
string_literal
15
import json import pytest from python_on_whales import docker 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_text(...
"gpu"
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_node.py
test_load_json
assert
string_literal
19
import json import pytest from python_on_whales import docker 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_text(...
"gpu-0"
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_node.py
test_tasks
assert
string_literal
17
import json import pytest from python_on_whales import docker 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(): service = docker.service.create("busybox", ["sleep", "infinity"]) ...
"running"
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_node.py
test_load_json
assert
numeric_literal
23
import json import pytest from python_on_whales import docker 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_text(...
4000000001
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_node.py
test_list_nodes
assert
func_call
13
import json import pytest from python_on_whales import docker 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(): nodes = docker.node.list() assert nodes[0].id[:12] in
repr(nodes)
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_node.py
test_remove_label
assert
complex_expr
15
import json import pytest from python_on_whales import docker 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_remove_label(): nodes = docker.node.list() nodes[0].update(labels_add={"foo...
nodes[0].spec.labels
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_node.py
test_list_tasks_node
assert
func_call
14
import json import pytest from python_on_whales import docker 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(): with docker.service.create("busybox", ["sleep", "infinity"])...
set(docker.service.ps(my_service))
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_plugin.py
test_remove_empty_plugin_list
assert
variable
21
import json from pathlib import Path from typing import List import pytest from python_on_whales import docker 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() -> List[P...
plugins_set
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_plugin.py
test_install_plugin_disable_enable
assert
func_call
23
import json from pathlib import Path from typing import List import pytest from python_on_whales import docker 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() -> List[P...
repr(my_plugin)
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_plugin.py
test_install_plugin_disable_enable
assert
func_call
22
import json from pathlib import Path from typing import List import pytest from python_on_whales import docker 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() -> List[P...
docker.plugin.list()
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_service.py
test_tasks
assert
numeric_literal
18
import json import tempfile import time import pytest from python_on_whales import docker 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 @pytest.mark.usefixtures(...
0
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor
gabrieldemarmiesse/python-on-whales
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
train
train
tests/python_on_whales/components/test_service.py
test_get_list_of_services_no_services
assert
collection
15
import json import tempfile import time import pytest from python_on_whales import docker 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 @pytest.mark.usefixtures(...
[]
ed2e5cec9c4bdf09d67f2a6a884cee437b51b3bb
225
v2_extractor_at_anchor