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
facebookresearch/partnr-planner
import gc import random from typing import Tuple import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import pytest from habitat_llm.agent.env.dataset import CollaborationDatasetV0 from habitat_llm.tests.test_planner import get_config, setup_env from habitat_llm.utils import setup_config ...
{}
assert
collection
habitat_llm/tests/test_world_graph.py
test_find_object_furniture_pairs
249
null
facebookresearch/partnr-planner
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
result_prompt
assert
variable
habitat_llm/tests/test_planner.py
test_react_based_llm_planner_rag_format
461
null
facebookresearch/partnr-planner
import itertools import os from copy import deepcopy from typing import List import habitat import numpy as np import pytest from habitat.sims.habitat_simulator import sim_utilities from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra import compose, initialize from habitat_llm....
explanation_str
assert
variable
habitat_llm/tests/test_evaluation.py
test_evaluation_explanation
615
null
facebookresearch/partnr-planner
from os import path as osp import habitat.datasets.rearrange.samplers.receptacle as hab_receptacle import habitat.sims.habitat_simulator.sim_utilities as sutils import pytest from habitat_sim import Simulator from habitat_sim.metadata import MetadataMediator from habitat_sim.utils.settings import default_sim_settings,...
0
assert
numeric_literal
habitat_llm/tests/test_metadata_interface.py
test_ovmm_source_objects
143
null
facebookresearch/partnr-planner
import pytest from habitat_llm.world_model.entity import Entity from habitat_llm.world_model.graph import Graph def test_remove_all_edges(): graph = Graph() with pytest.raises(ValueError) as e: graph.remove_all_edges("test") assert "test not present in the graph" in str(e.value) test_nodes = [...
1
assert
numeric_literal
habitat_llm/tests/test_graph.py
test_remove_all_edges
47
null
facebookresearch/partnr-planner
import gc import random from typing import Tuple import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import pytest from habitat_llm.agent.env.dataset import CollaborationDatasetV0 from habitat_llm.tests.test_planner import get_config, setup_env from habitat_llm.utils import setup_config ...
room
assert
variable
habitat_llm/tests/test_world_graph.py
test_get_node_with_property
213
null
facebookresearch/partnr-planner
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
[2, 2]
assert
collection
habitat_llm/tests/test_planner.py
test_planner_demo_multiproc
533
null
facebookresearch/partnr-planner
import sys from habitat_llm.agent.env.dataset import CollaborationDatasetV0 sys.path.append("..") import re import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import numpy as np import pytest from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra i...
0.45
assert
numeric_literal
habitat_llm/tests/test_skills.py
test_oracle_point_skills
906
null
facebookresearch/partnr-planner
import itertools import os from copy import deepcopy from typing import List import habitat import numpy as np import pytest from habitat.sims.habitat_simulator import sim_utilities from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra import compose, initialize from habitat_llm....
4
assert
numeric_literal
habitat_llm/tests/test_evaluation.py
test_evaluation_constraints
432
null
facebookresearch/partnr-planner
import itertools import os from copy import deepcopy from typing import List import habitat import numpy as np import pytest from habitat.sims.habitat_simulator import sim_utilities from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra import compose, initialize from habitat_llm....
expected_result
assert
variable
habitat_llm/tests/test_evaluation.py
test_proposition_dependencies_any_mode
234
null
facebookresearch/partnr-planner
from typing import List import pytest from dataset_generation.benchmark_generation.evaluation_generation.heuristics import ( spatial_temporal_correction_heuristic, ) from dataset_generation.benchmark_generation.evaluation_generation.parsing import ( TemporalParser, ) from habitat_llm.agent.env.evaluation.eval...
expected_groups
assert
variable
dataset_generation/tests/test_evaluation_generator.py
test_spatial_temporal_heuristic
110
null
facebookresearch/partnr-planner
import pytest from habitat_llm.world_model.entity import Entity from habitat_llm.world_model.graph import Graph def test_get_neighbors(): graph = Graph() # make sure error is raised if node is not present with pytest.raises(ValueError) as e: graph.get_neighbors("test") assert "test not presen...
{test_nodes[0]: "test_edge"}
assert
collection
habitat_llm/tests/test_graph.py
test_get_neighbors
81
null
facebookresearch/partnr-planner
import gc import pytest from transformers_cfg.parser import parse_ebnf from transformers_cfg.recognizer import StringRecognizer from habitat_llm.agent.env.dataset import CollaborationDatasetV0 from habitat_llm.evaluation.decentralized_evaluation_runner import ( DecentralizedEvaluationRunner, ) from habitat_llm.te...
grammar_str
assert
variable
habitat_llm/tests/test_constrained_generation.py
test_grammar_generation
123
null
facebookresearch/partnr-planner
import json import time import pytest from habitat import logger from hydra import compose, initialize from habitat_llm.agent.env import register_sensors # noqa from habitat_llm.agent.env.dataset import CollaborationDatasetV0, CollaborationEpisode def check_json_serialization(dataset: CollaborationDatasetV0): s...
json.loads( json_str )
assert
func_call
habitat_llm/tests/test_dataset.py
check_json_serialization
31
null
facebookresearch/partnr-planner
import sys from habitat_llm.agent.env.dataset import CollaborationDatasetV0 sys.path.append("..") import re import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import numpy as np import pytest from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra i...
max_skill_steps
assert
variable
habitat_llm/tests/test_skills.py
execute_skill
186
null
facebookresearch/partnr-planner
import json import time import pytest from habitat import logger from hydra import compose, initialize from habitat_llm.agent.env import register_sensors # noqa from habitat_llm.agent.env.dataset import CollaborationDatasetV0, CollaborationEpisode def check_json_serialization(dataset: CollaborationDatasetV0): s...
bin_dict
assert
variable
habitat_llm/tests/test_dataset.py
check_binary_serialization
50
null
facebookresearch/partnr-planner
import itertools import os from copy import deepcopy from typing import List import habitat import numpy as np import pytest from habitat.sims.habitat_simulator import sim_utilities from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra import compose, initialize from habitat_llm....
"102817140"
assert
string_literal
habitat_llm/tests/test_evaluation.py
test_sim_predicates
87
null
facebookresearch/partnr-planner
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
gt_responses
assert
variable
habitat_llm/tests/test_planner.py
test_oracle_planner_teleport
144
null
facebookresearch/partnr-planner
import gc from copy import deepcopy from os import path as osp import pytest from dataset_generation.benchmark_generation.generate_episodes import ( default_gen_config, generate_episode, get_generator_state_semantic_debug_info, initialize_generator, ) from habitat_llm.agent.env.dataset import Collabor...
0
assert
numeric_literal
dataset_generation/tests/test_episode_generator.py
test_llm_rearrange_episode_generator
181
null
facebookresearch/partnr-planner
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
1.0
assert
numeric_literal
habitat_llm/tests/test_planner.py
test_oracle_planner_teleport
147
null
facebookresearch/partnr-planner
import gc import random from typing import Tuple import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import pytest from habitat_llm.agent.env.dataset import CollaborationDatasetV0 from habitat_llm.tests.test_planner import get_config, setup_env from habitat_llm.utils import setup_config ...
[]
assert
collection
habitat_llm/tests/test_world_graph.py
test_get_neighbors_of_classtype
177
null
facebookresearch/partnr-planner
import gc import random from typing import Tuple import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import pytest from habitat_llm.agent.env.dataset import CollaborationDatasetV0 from habitat_llm.tests.test_planner import get_config, setup_env from habitat_llm.utils import setup_config ...
0
assert
numeric_literal
habitat_llm/tests/test_world_graph.py
test_empty_world_graph
92
null
facebookresearch/partnr-planner
import itertools import os from copy import deepcopy from typing import List import habitat import numpy as np import pytest from habitat.sims.habitat_simulator import sim_utilities from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra import compose, initialize from habitat_llm....
1.0
assert
numeric_literal
habitat_llm/tests/test_evaluation.py
test_compute_percent_complete
472
null
facebookresearch/partnr-planner
import sys from habitat_llm.agent.env.dataset import CollaborationDatasetV0 sys.path.append("..") import re import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import numpy as np import pytest from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra i...
counter_name
assert
variable
habitat_llm/tests/test_skills.py
test_floors
835
null
facebookresearch/partnr-planner
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
planner0.curr_prompt
assert
complex_expr
habitat_llm/tests/test_planner.py
test_zero_shot_react_planner
575
null
facebookresearch/partnr-planner
import json from habitat_llm.world_model import DynamicWorldGraph, Object world_model_path = "data/hssd-partnr-ci/conceptgraph/test_cg_data.json" def test_reading_cg(): with open(world_model_path, "r") as f: sg_dict_list = json.load(f) mygraph = DynamicWorldGraph() mygraph.create_cg_edges(sg_dic...
"object"
assert
string_literal
habitat_llm/tests/test_cg_graph.py
test_reading_cg
54
null
facebookresearch/partnr-planner
import pytest from habitat_llm.world_model.entity import Entity from habitat_llm.world_model.graph import Graph def test_get_neighbors(): graph = Graph() # make sure error is raised if node is not present with pytest.raises(ValueError) as e: graph.get_neighbors("test") assert "test not presen...
{}
assert
collection
habitat_llm/tests/test_graph.py
test_get_neighbors
87
null
facebookresearch/partnr-planner
import json import time import pytest from habitat import logger from hydra import compose, initialize from habitat_llm.agent.env import register_sensors # noqa from habitat_llm.agent.env.dataset import CollaborationDatasetV0, CollaborationEpisode def check_json_serialization(dataset: CollaborationDatasetV0): s...
dataset_decoded_bin
assert
variable
habitat_llm/tests/test_dataset.py
check_binary_serialization
51
null
facebookresearch/partnr-planner
import gc import random from typing import Tuple import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import pytest from habitat_llm.agent.env.dataset import CollaborationDatasetV0 from habitat_llm.tests.test_planner import get_config, setup_env from habitat_llm.utils import setup_config ...
obj
assert
variable
habitat_llm/tests/test_world_graph.py
test_get_node_with_property
214
null
facebookresearch/partnr-planner
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
scores[0])
pytest.approx
complex_expr
habitat_llm/tests/test_planner.py
test_react_based_llm_planner_rag_format
452
null
facebookresearch/partnr-planner
import pytest from habitat_llm.world_model.entity import Entity from habitat_llm.world_model.graph import Graph def test_get_node_from_name(): graph = Graph() with pytest.raises(
ValueError)
pytest.raises
variable
habitat_llm/tests/test_graph.py
test_get_node_from_name
15
null
facebookresearch/partnr-planner
import sys from habitat_llm.agent.env.dataset import CollaborationDatasetV0 sys.path.append("..") import re import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import numpy as np import pytest from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra i...
{ 0: "Successful execution!" }
assert
collection
habitat_llm/tests/test_skills.py
check_skills_execution
217
null
facebookresearch/partnr-planner
import json import time import pytest from habitat import logger from hydra import compose, initialize from habitat_llm.agent.env import register_sensors # noqa from habitat_llm.agent.env.dataset import CollaborationDatasetV0, CollaborationEpisode def check_json_serialization(dataset: CollaborationDatasetV0): s...
len(dataset.episodes)
assert
func_call
habitat_llm/tests/test_dataset.py
check_json_serialization
25
null
facebookresearch/partnr-planner
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
4
assert
numeric_literal
habitat_llm/tests/test_planner.py
test_planner_demo_multiproc
531
null
facebookresearch/partnr-planner
import gc from copy import deepcopy from os import path as osp import pytest from dataset_generation.benchmark_generation.generate_episodes import ( default_gen_config, generate_episode, get_generator_state_semantic_debug_info, initialize_generator, ) from habitat_llm.agent.env.dataset import Collabor...
ep.info
assert
complex_expr
dataset_generation/tests/test_episode_generator.py
test_llm_rearrange_episode_generator
221
null
facebookresearch/partnr-planner
from os import path as osp import habitat.datasets.rearrange.samplers.receptacle as hab_receptacle import habitat.sims.habitat_simulator.sim_utilities as sutils import pytest from habitat_sim import Simulator from habitat_sim.metadata import MetadataMediator from habitat_sim.utils.settings import default_sim_settings,...
None
assert
none_literal
habitat_llm/tests/test_metadata_interface.py
test_metadata_interface
47
null
facebookresearch/partnr-planner
import sys from habitat_llm.agent.env.dataset import CollaborationDatasetV0 sys.path.append("..") import re import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import numpy as np import pytest from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra i...
5
assert
numeric_literal
habitat_llm/tests/test_skills.py
test_object_state_skills
523
null
facebookresearch/partnr-planner
import gc import random from typing import Tuple import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import pytest from habitat_llm.agent.env.dataset import CollaborationDatasetV0 from habitat_llm.tests.test_planner import get_config, setup_env from habitat_llm.utils import setup_config ...
"on"
assert
string_literal
habitat_llm/tests/test_world_graph.py
test_get_subgraph
77
null
facebookresearch/partnr-planner
import gc from copy import deepcopy from os import path as osp import pytest from dataset_generation.benchmark_generation.generate_episodes import ( default_gen_config, generate_episode, get_generator_state_semantic_debug_info, initialize_generator, ) from habitat_llm.agent.env.dataset import Collabor...
None
assert
none_literal
dataset_generation/tests/test_episode_generator.py
test_llm_rearrange_episode_generator
216
null
facebookresearch/partnr-planner
import itertools import os from copy import deepcopy from typing import List import habitat import numpy as np import pytest from habitat.sims.habitat_simulator import sim_utilities from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra import compose, initialize from habitat_llm....
0.75
assert
numeric_literal
habitat_llm/tests/test_evaluation.py
test_compute_percent_complete
475
null
facebookresearch/partnr-planner
import sys from habitat_llm.agent.env.dataset import CollaborationDatasetV0 sys.path.append("..") import re import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import numpy as np import pytest from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra i...
cushion_obj.object_id
assert
complex_expr
habitat_llm/tests/test_skills.py
test_oracle_point_skills
930
null
facebookresearch/partnr-planner
import gc import random from typing import Tuple import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import pytest from habitat_llm.agent.env.dataset import CollaborationDatasetV0 from habitat_llm.tests.test_planner import get_config, setup_env from habitat_llm.utils import setup_config ...
1
assert
numeric_literal
habitat_llm/tests/test_world_graph.py
test_count_nodes_of_type
192
null
facebookresearch/partnr-planner
import sys from habitat_llm.agent.env.dataset import CollaborationDatasetV0 sys.path.append("..") import re import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import numpy as np import pytest from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra i...
0
assert
numeric_literal
habitat_llm/tests/test_skills.py
execute_skill
195
null
facebookresearch/partnr-planner
import gc import random from typing import Tuple import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import pytest from habitat_llm.agent.env.dataset import CollaborationDatasetV0 from habitat_llm.tests.test_planner import get_config, setup_env from habitat_llm.utils import setup_config ...
None
assert
none_literal
habitat_llm/tests/test_world_graph.py
test_get_node_with_property
217
null
facebookresearch/partnr-planner
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
8
assert
numeric_literal
habitat_llm/tests/test_planner.py
test_oracle_planner_teleport
151
null
facebookresearch/partnr-planner
import itertools import os from copy import deepcopy from typing import List import habitat import numpy as np import pytest from habitat.sims.habitat_simulator import sim_utilities from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra import compose, initialize from habitat_llm....
0.0
assert
numeric_literal
habitat_llm/tests/test_evaluation.py
test_compute_percent_complete
474
null
facebookresearch/partnr-planner
import json import time import pytest from habitat import logger from hydra import compose, initialize from habitat_llm.agent.env import register_sensors # noqa from habitat_llm.agent.env.dataset import CollaborationDatasetV0, CollaborationEpisode def check_json_serialization(dataset: CollaborationDatasetV0): s...
json.loads( dataset.to_json() )
assert
func_call
habitat_llm/tests/test_dataset.py
check_binary_serialization
54
null
facebookresearch/partnr-planner
import itertools import os from copy import deepcopy from typing import List import habitat import numpy as np import pytest from habitat.sims.habitat_simulator import sim_utilities from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra import compose, initialize from habitat_llm....
0.5
assert
numeric_literal
habitat_llm/tests/test_evaluation.py
test_compute_percent_complete
473
null
facebookresearch/partnr-planner
import json import time import pytest from habitat import logger from hydra import compose, initialize from habitat_llm.agent.env import register_sensors # noqa from habitat_llm.agent.env.dataset import CollaborationDatasetV0, CollaborationEpisode def check_json_serialization(dataset: CollaborationDatasetV0): s...
0
assert
numeric_literal
habitat_llm/tests/test_dataset.py
test_collaboration_dataset
71
null
facebookresearch/partnr-planner
import itertools import os from copy import deepcopy from typing import List import habitat import numpy as np import pytest from habitat.sims.habitat_simulator import sim_utilities from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra import compose, initialize from habitat_llm....
5
assert
numeric_literal
habitat_llm/tests/test_evaluation.py
test_evaluation_constraints
433
null
facebookresearch/partnr-planner
import itertools import os from copy import deepcopy from typing import List import habitat import numpy as np import pytest from habitat.sims.habitat_simulator import sim_utilities from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra import compose, initialize from habitat_llm....
TFT
assert
variable
habitat_llm/tests/test_evaluation.py
test_evaluation_constraints
375
null
facebookresearch/partnr-planner
import gc import random from typing import Tuple import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import pytest from habitat_llm.agent.env.dataset import CollaborationDatasetV0 from habitat_llm.tests.test_planner import get_config, setup_env from habitat_llm.utils import setup_config ...
"in"
assert
string_literal
habitat_llm/tests/test_world_graph.py
test_get_subgraph
78
null
facebookresearch/partnr-planner
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
"table_47"
assert
string_literal
habitat_llm/tests/test_planner.py
test_oracle_planner
228
null
facebookresearch/partnr-planner
import itertools import os from copy import deepcopy from typing import List import habitat import numpy as np import pytest from habitat.sims.habitat_simulator import sim_utilities from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra import compose, initialize from habitat_llm....
expected_result[relation]
assert
complex_expr
habitat_llm/tests/test_evaluation.py
test_proposition_dependencies
288
null
facebookresearch/partnr-planner
import pytest from habitat_llm.world_model.entity import Entity from habitat_llm.world_model.graph import Graph def test_get_node_from_name(): graph = Graph() with pytest.raises(ValueError) as e: graph.get_node_from_name("test") assert "Node with name test not present" in
str(e.value)
assert
func_call
habitat_llm/tests/test_graph.py
test_get_node_from_name
17
null
facebookresearch/partnr-planner
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
end_token)
assert_*
variable
habitat_llm/tests/test_planner.py
test_thoughtless_llm_planner
360
null
samuelcolvin/watchfiles
import os import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from watchfiles._rust_notify import RustNotify from watchfiles.main import _default_ignore_permission_denied skip_unless_linux = pytest.mark.skipif('linux' not in sys.platform, reason='avoid differences on other sy...
RuntimeError, match='RustNotify watcher closed')
pytest.raises
complex_expr
tests/test_rust_notify.py
test_close
42
null
samuelcolvin/watchfiles
import os import subprocess import sys from multiprocessing.context import SpawnProcess from pathlib import Path from typing import TYPE_CHECKING import pytest from dirty_equals import IsStr from watchfiles import arun_process, run_process from watchfiles.main import Change from watchfiles.run import detect_target_ty...
4
assert
numeric_literal
tests/test_run_process.py
test_alive_doesnt_terminate
93
null
samuelcolvin/watchfiles
import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from dirty_equals import IsTuple from watchfiles import Change, DefaultFilter, PythonFilter, watch @pytest.mark.parametrize( 'path,expected', [ ('foo.txt', True), ('foo.swp', False), ('foo.swx...
expected
assert
variable
tests/test_filters.py
test_default_filter
81
null
samuelcolvin/watchfiles
import os import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from watchfiles._rust_notify import RustNotify from watchfiles.main import _default_ignore_permission_denied skip_unless_linux = pytest.mark.skipif('linux' not in sys.platform, reason='avoid differences on other sy...
'stop'
assert
string_literal
tests/test_rust_notify.py
test_return_event_set
241
null
samuelcolvin/watchfiles
import os import subprocess import sys from multiprocessing.context import SpawnProcess from pathlib import Path from typing import TYPE_CHECKING import pytest from dirty_equals import IsStr from watchfiles import arun_process, run_process from watchfiles.main import Change from watchfiles.run import detect_target_ty...
1
assert
numeric_literal
tests/test_run_process.py
test_alive_terminates
50
null
samuelcolvin/watchfiles
import os import sys from pathlib import Path import pytest from dirty_equals import HasAttributes, HasLen, IsInstance from watchfiles import BaseFilter, DefaultFilter, PythonFilter from watchfiles.cli import build_filter, cli pytestmark = pytest.mark.skipif(sys.platform == 'win32', reason='many tests fail on window...
err
assert
variable
tests/test_cli.py
test_filter_all
193
null
samuelcolvin/watchfiles
import os import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from watchfiles._rust_notify import RustNotify from watchfiles.main import _default_ignore_permission_denied skip_unless_linux = pytest.mark.skipif('linux' not in sys.platform, reason='avoid differences on other sy...
FileNotFoundError, match='No such file or directory')
pytest.raises
complex_expr
tests/test_rust_notify.py
test_does_not_exist_polling
171
null
samuelcolvin/watchfiles
import os import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from watchfiles._rust_notify import RustNotify from watchfiles.main import _default_ignore_permission_denied skip_unless_linux = pytest.mark.skipif('linux' not in sys.platform, reason='avoid differences on other sy...
FileNotFoundError)
pytest.raises
variable
tests/test_rust_notify.py
test_does_not_exist
158
null
samuelcolvin/watchfiles
import sys import threading from contextlib import contextmanager from pathlib import Path from time import sleep from typing import TYPE_CHECKING import anyio import pytest from watchfiles import Change, awatch, watch from watchfiles.main import _calc_async_timeout def mock_open_signal_receiver(signal): async d...
1_000
assert
numeric_literal
tests/test_watch.py
test_calc_async_timeout_win
201
null
samuelcolvin/watchfiles
import os import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from watchfiles._rust_notify import RustNotify from watchfiles.main import _default_ignore_permission_denied skip_unless_linux = pytest.mark.skipif('linux' not in sys.platform, reason='avoid differences on other sy...
expected_changes
assert
variable
tests/test_rust_notify.py
test_move_internal
153
null
samuelcolvin/watchfiles
import sys import threading from contextlib import contextmanager from pathlib import Path from time import sleep from typing import TYPE_CHECKING import anyio import pytest from watchfiles import Change, awatch, watch from watchfiles.main import _calc_async_timeout def mock_open_signal_receiver(signal): async d...
123
assert
numeric_literal
tests/test_watch.py
test_calc_async_timeout_posix
194
null
samuelcolvin/watchfiles
import sys import threading from contextlib import contextmanager from pathlib import Path from time import sleep from typing import TYPE_CHECKING import anyio import pytest from watchfiles import Change, awatch, watch from watchfiles.main import _calc_async_timeout def test_watch_dont_raise_interrupt(mock_rust_noti...
StopIteration)
pytest.raises
variable
tests/test_watch.py
test_watch_dont_raise_interrupt
77
null
samuelcolvin/watchfiles
import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from dirty_equals import IsTuple from watchfiles import Change, DefaultFilter, PythonFilter, watch @pytest.mark.skipif(sys.platform == 'win32', reason='paths are different on windows') def test_customising_filters(): f =...
('/a/b',)
assert
collection
tests/test_filters.py
test_customising_filters
92
null
samuelcolvin/watchfiles
import sys import threading from contextlib import contextmanager from pathlib import Path from time import sleep from typing import TYPE_CHECKING import anyio import pytest from watchfiles import Change, awatch, watch from watchfiles.main import _calc_async_timeout def mock_open_signal_receiver(signal): async d...
2
assert
numeric_literal
tests/test_watch.py
test_watch_no_yield
118
null
samuelcolvin/watchfiles
import os import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from watchfiles._rust_notify import RustNotify from watchfiles.main import _default_ignore_permission_denied skip_unless_linux = pytest.mark.skipif('linux' not in sys.platform, reason='avoid differences on other sy...
{(1, str(test_dir / 'new_file_non_recursive.txt'))}
assert
collection
tests/test_rust_notify.py
test_add_non_recursive
32
null
samuelcolvin/watchfiles
import os import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from watchfiles._rust_notify import RustNotify from watchfiles.main import _default_ignore_permission_denied skip_unless_linux = pytest.mark.skipif('linux' not in sys.platform, reason='avoid differences on other sy...
{(2, str(test_dir / 'b.txt'))}
assert
collection
tests/test_rust_notify.py
test_modify_chmod
72
null
samuelcolvin/watchfiles
import os import sys from pathlib import Path import pytest from dirty_equals import HasAttributes, HasLen, IsInstance from watchfiles import BaseFilter, DefaultFilter, PythonFilter from watchfiles.cli import build_filter, cli pytestmark = pytest.mark.skipif(sys.platform == 'win32', reason='many tests fail on window...
tmp_path)
assert_*
variable
tests/test_cli.py
test_filter_all
179
null
samuelcolvin/watchfiles
import os import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from watchfiles._rust_notify import RustNotify from watchfiles.main import _default_ignore_permission_denied skip_unless_linux = pytest.mark.skipif('linux' not in sys.platform, reason='avoid differences on other sy...
{(2, str(test_dir / 'a.txt'))}
assert
collection
tests/test_rust_notify.py
test_modify_write
51
null
samuelcolvin/watchfiles
import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from dirty_equals import IsTuple from watchfiles import Change, DefaultFilter, PythonFilter, watch def test_ignore_file(mock_rust_notify: 'MockRustType'): mock = mock_rust_notify([{(1, 'spam.pyc'), (1, 'spam.swp'), (1, '...
1
assert
numeric_literal
tests/test_filters.py
test_ignore_file
19
null
samuelcolvin/watchfiles
import os import subprocess import sys from multiprocessing.context import SpawnProcess from pathlib import Path from typing import TYPE_CHECKING import pytest from dirty_equals import IsStr from watchfiles import arun_process, run_process from watchfiles.main import Change from watchfiles.run import detect_target_ty...
3
assert
numeric_literal
tests/test_run_process.py
test_dead_callback
66
null
samuelcolvin/watchfiles
import sys import threading from contextlib import contextmanager from pathlib import Path from time import sleep from typing import TYPE_CHECKING import anyio import pytest from watchfiles import Change, awatch, watch from watchfiles.main import _calc_async_timeout def mock_open_signal_receiver(signal): async d...
1
assert
numeric_literal
tests/test_watch.py
test_awatch_unexpected_signal
99
null
samuelcolvin/watchfiles
import os import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from watchfiles._rust_notify import RustNotify from watchfiles.main import _default_ignore_permission_denied skip_unless_linux = pytest.mark.skipif('linux' not in sys.platform, reason='avoid differences on other sy...
PermissionError)
pytest.raises
variable
tests/test_rust_notify.py
test_ignore_permission_denied
321
null
samuelcolvin/watchfiles
import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from dirty_equals import IsTuple from watchfiles import Change, DefaultFilter, PythonFilter, watch def test_simple_function(mock_rust_notify: 'MockRustType'): mock_rust_notify([{(1, 'added.txt'), (2, 'mod.txt'), (3, 'del...
{(Change.added, 'added.txt')}
assert
collection
tests/test_filters.py
test_simple_function
61
null
samuelcolvin/watchfiles
import os import sys from pathlib import Path import pytest from dirty_equals import HasAttributes, HasLen, IsInstance from watchfiles import BaseFilter, DefaultFilter, PythonFilter from watchfiles.cli import build_filter, cli pytestmark = pytest.mark.skipif(sys.platform == 'win32', reason='many tests fail on window...
os.getcwd
assert
complex_expr
tests/test_cli.py
test_build_filter_warning
263
null
samuelcolvin/watchfiles
from __future__ import annotations as _annotations from typing import TYPE_CHECKING import pytest from watchfiles import watch from watchfiles.main import _default_force_polling @pytest.mark.parametrize( 'env_var,arg,expected,call_count', [ (None, True, True, 0), (None, False, False, 0), ...
call_count
assert
variable
tests/test_force_polling.py
test_default_force_polling_wsl
104
null
samuelcolvin/watchfiles
import os import sys from pathlib import Path import pytest from dirty_equals import HasAttributes, HasLen, IsInstance from watchfiles import BaseFilter, DefaultFilter, PythonFilter from watchfiles.cli import build_filter, cli pytestmark = pytest.mark.skipif(sys.platform == 'win32', reason='many tests fail on window...
''
assert
string_literal
tests/test_cli.py
test_invalid_import1
72
null
samuelcolvin/watchfiles
import os import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from watchfiles._rust_notify import RustNotify from watchfiles.main import _default_ignore_permission_denied skip_unless_linux = pytest.mark.skipif('linux' not in sys.platform, reason='avoid differences on other sy...
expected
assert
variable
tests/test_rust_notify.py
test_default_ignore_permission_denied
342
null
samuelcolvin/watchfiles
import os import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from watchfiles._rust_notify import RustNotify from watchfiles.main import _default_ignore_permission_denied skip_unless_linux = pytest.mark.skipif('linux' not in sys.platform, reason='avoid differences on other sy...
{(1, str(test_dir / 'debounce.txt'))}
assert
collection
tests/test_rust_notify.py
test_return_debounce_no_timeout
259
null
samuelcolvin/watchfiles
import os import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from watchfiles._rust_notify import RustNotify from watchfiles.main import _default_ignore_permission_denied skip_unless_linux = pytest.mark.skipif('linux' not in sys.platform, reason='avoid differences on other sy...
TypeError, match="'int' object is not callable")
pytest.raises
complex_expr
tests/test_rust_notify.py
test_wrong_type_event_is_set
216
null
samuelcolvin/watchfiles
import sys import threading from contextlib import contextmanager from pathlib import Path from time import sleep from typing import TYPE_CHECKING import anyio import pytest from watchfiles import Change, awatch, watch from watchfiles.main import _calc_async_timeout def test_watch_raise_interrupt(mock_rust_notify: '...
KeyboardInterrupt)
pytest.raises
variable
tests/test_watch.py
test_watch_raise_interrupt
67
null
samuelcolvin/watchfiles
import sys import threading from contextlib import contextmanager from pathlib import Path from time import sleep from typing import TYPE_CHECKING import anyio import pytest from watchfiles import Change, awatch, watch from watchfiles.main import _calc_async_timeout def test_watch_raise_interrupt(mock_rust_notify: '...
{(Change.added, 'foo.txt')}
assert
collection
tests/test_watch.py
test_watch_raise_interrupt
66
null
samuelcolvin/watchfiles
import os import sys from pathlib import Path import pytest from dirty_equals import HasAttributes, HasLen, IsInstance from watchfiles import BaseFilter, DefaultFilter, PythonFilter from watchfiles.cli import build_filter, cli pytestmark = pytest.mark.skipif(sys.platform == 'win32', reason='many tests fail on window...
1)
assert_*
numeric_literal
tests/test_cli.py
test_invalid_import1
70
null
samuelcolvin/watchfiles
import sys import threading from contextlib import contextmanager from pathlib import Path from time import sleep from typing import TYPE_CHECKING import anyio import pytest from watchfiles import Change, awatch, watch from watchfiles.main import _calc_async_timeout def mock_open_signal_receiver(signal): async d...
('test error',)
assert
collection
tests/test_watch.py
test_awatch_interrupt_raise
236
null
samuelcolvin/watchfiles
import os import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from watchfiles._rust_notify import RustNotify from watchfiles.main import _default_ignore_permission_denied skip_unless_linux = pytest.mark.skipif('linux' not in sys.platform, reason='avoid differences on other sy...
{(1, str(test_dir / 'new_file.txt'))}
assert
collection
tests/test_rust_notify.py
test_add
23
null
samuelcolvin/watchfiles
import os import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from watchfiles._rust_notify import RustNotify from watchfiles.main import _default_ignore_permission_denied skip_unless_linux = pytest.mark.skipif('linux' not in sys.platform, reason='avoid differences on other sy...
'RustNotify(None)'
assert
string_literal
tests/test_rust_notify.py
test_close
41
null
samuelcolvin/watchfiles
import importlib.util import re import sys from collections import namedtuple from pathlib import Path from textwrap import dedent from typing import TYPE_CHECKING from unittest.mock import MagicMock import pytest from _pytest.assertion.rewrite import AssertionRewritingHook from watchfiles.cli import cli pytestmark ...
cli_help_path.read_text()
assert
func_call
tests/test_docs.py
test_cli_help
119
null
samuelcolvin/watchfiles
import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from dirty_equals import IsTuple from watchfiles import Change, DefaultFilter, PythonFilter, watch def test_web_filter(mock_rust_notify: 'MockRustType'): # test case from docs class WebFilter(DefaultFilter): ...
{(Change.modified, 'bar.html'), (Change.added, '.other.js')}
assert
collection
tests/test_filters.py
test_web_filter
52
null
samuelcolvin/watchfiles
import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from dirty_equals import IsTuple from watchfiles import Change, DefaultFilter, PythonFilter, watch @pytest.mark.skipif(sys.platform == 'win32', reason='paths are different on windows') def test_customising_filters(): f =...
[r'\.cat$']
assert
collection
tests/test_filters.py
test_customising_filters
89
null
samuelcolvin/watchfiles
import sys import threading from contextlib import contextmanager from pathlib import Path from time import sleep from typing import TYPE_CHECKING import anyio import pytest from watchfiles import Change, awatch, watch from watchfiles.main import _calc_async_timeout def mock_open_signal_receiver(signal): async d...
5_000
assert
numeric_literal
tests/test_watch.py
test_calc_async_timeout_posix
195
null
samuelcolvin/watchfiles
import importlib.util import re import sys from collections import namedtuple from pathlib import Path from textwrap import dedent from typing import TYPE_CHECKING from unittest.mock import MagicMock import pytest from _pytest.assertion.rewrite import AssertionRewritingHook from watchfiles.cli import cli pytestmark ...
''
assert
string_literal
tests/test_docs.py
test_cli_help
115
null
samuelcolvin/watchfiles
import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from dirty_equals import IsTuple from watchfiles import Change, DefaultFilter, PythonFilter, watch @pytest.mark.skipif(sys.platform == 'win32', reason='paths are different on windows') def test_customising_filters(): f =...
['apple', 'banana']
assert
collection
tests/test_filters.py
test_customising_filters
87
null
samuelcolvin/watchfiles
import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from dirty_equals import IsTuple from watchfiles import Change, DefaultFilter, PythonFilter, watch def test_python(mock_rust_notify: 'MockRustType'): mock_rust_notify([{(2, 'spam.txt'), (2, 'spam.md'), (2, 'foo.py')}]) ...
{(Change.modified, 'foo.py')}
assert
collection
tests/test_filters.py
test_python
31
null
samuelcolvin/watchfiles
import re import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from dirty_equals import IsTuple from watchfiles import Change, DefaultFilter, PythonFilter, watch def test_ignore_file(mock_rust_notify: 'MockRustType'): mock = mock_rust_notify([{(1, 'spam.pyc'), (1, 'spam.swp'), (1, '...
{(Change.added, 'foo.txt')}
assert
collection
tests/test_filters.py
test_ignore_file
18
null
samuelcolvin/watchfiles
import sys import threading from contextlib import contextmanager from pathlib import Path from time import sleep from typing import TYPE_CHECKING import anyio import pytest from watchfiles import Change, awatch, watch from watchfiles.main import _calc_async_timeout def mock_open_signal_receiver(signal): async d...
BaseExceptionGroup)
pytest.raises
variable
tests/test_watch.py
test_awatch_interrupt_raise
229
null