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
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_arbitrage_integration.py
test_reverting_arbitrage
assert
string_literal
25
from mev_inspect.arbitrages import get_arbitrages from mev_inspect.classifiers.trace import TraceClassifier from mev_inspect.swaps import get_swaps from .utils import load_test_block def test_reverting_arbitrage(trace_classifier: TraceClassifier): block = load_test_block(11473321) classified_traces = trace_cl...
"Reverted"
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_arbitrages.py
test_two_pool_arbitrage
assert
numeric_literal
83
from typing import List, Tuple from mev_inspect.arbitrages import _get_shortest_route, get_arbitrages from mev_inspect.classifiers.specs.uniswap import ( UNISWAP_V2_PAIR_ABI_NAME, UNISWAP_V3_POOL_ABI_NAME, ) from mev_inspect.schemas.swaps import Swap def test_two_pool_arbitrage(get_transaction_hashes, get_add...
1
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_arbitrages.py
test_get_shortest_route
assert
numeric_literal
17
from typing import List, Tuple from mev_inspect.arbitrages import _get_shortest_route, get_arbitrages from mev_inspect.classifiers.specs.uniswap import ( UNISWAP_V2_PAIR_ABI_NAME, UNISWAP_V3_POOL_ABI_NAME, ) from mev_inspect.schemas.swaps import Swap def test_get_shortest_route(): # A -> B, B -> A sta...
2
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_arbitrages.py
test_get_shortest_route
assert
numeric_literal
25
from typing import List, Tuple from mev_inspect.arbitrages import _get_shortest_route, get_arbitrages from mev_inspect.classifiers.specs.uniswap import ( UNISWAP_V2_PAIR_ABI_NAME, UNISWAP_V3_POOL_ABI_NAME, ) from mev_inspect.schemas.swaps import Swap def test_get_shortest_route(): # A -> B, B -> A sta...
3
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_arbitrages.py
test_get_shortest_route
assert
none_literal
16
from typing import List, Tuple from mev_inspect.arbitrages import _get_shortest_route, get_arbitrages from mev_inspect.classifiers.specs.uniswap import ( UNISWAP_V2_PAIR_ABI_NAME, UNISWAP_V3_POOL_ABI_NAME, ) from mev_inspect.schemas.swaps import Swap def test_get_shortest_route(): # A -> B, B -> A sta...
None
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_arbitrages.py
test_three_pool_arbitrage
assert
variable
82
from typing import List, Tuple from mev_inspect.arbitrages import _get_shortest_route, get_arbitrages from mev_inspect.classifiers.specs.uniswap import ( UNISWAP_V2_PAIR_ABI_NAME, UNISWAP_V3_POOL_ABI_NAME, ) from mev_inspect.schemas.swaps import Swap def test_three_pool_arbitrage(get_transaction_hashes, get_a...
swaps
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_arbitrages.py
test_two_pool_arbitrage
assert
variable
87
from typing import List, Tuple from mev_inspect.arbitrages import _get_shortest_route, get_arbitrages from mev_inspect.classifiers.specs.uniswap import ( UNISWAP_V2_PAIR_ABI_NAME, UNISWAP_V3_POOL_ABI_NAME, ) from mev_inspect.schemas.swaps import Swap def test_two_pool_arbitrage(get_transaction_hashes, get_add...
arb_swaps
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_arbitrages.py
test_two_pool_arbitrage
assert
variable
88
from typing import List, Tuple from mev_inspect.arbitrages import _get_shortest_route, get_arbitrages from mev_inspect.classifiers.specs.uniswap import ( UNISWAP_V2_PAIR_ABI_NAME, UNISWAP_V3_POOL_ABI_NAME, ) from mev_inspect.schemas.swaps import Swap def test_two_pool_arbitrage(get_transaction_hashes, get_add...
account_address
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_arbitrages.py
test_two_pool_arbitrage
assert
variable
89
from typing import List, Tuple from mev_inspect.arbitrages import _get_shortest_route, get_arbitrages from mev_inspect.classifiers.specs.uniswap import ( UNISWAP_V2_PAIR_ABI_NAME, UNISWAP_V3_POOL_ABI_NAME, ) from mev_inspect.schemas.swaps import Swap def test_two_pool_arbitrage(get_transaction_hashes, get_add...
first_token_address
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_arbitrages.py
test_two_pool_arbitrage
assert
variable
90
from typing import List, Tuple from mev_inspect.arbitrages import _get_shortest_route, get_arbitrages from mev_inspect.classifiers.specs.uniswap import ( UNISWAP_V2_PAIR_ABI_NAME, UNISWAP_V3_POOL_ABI_NAME, ) from mev_inspect.schemas.swaps import Swap def test_two_pool_arbitrage(get_transaction_hashes, get_add...
first_token_in_amount
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_arbitrages.py
_assert_route_tokens_equal
assert
complex_expr
20
from typing import List, Tuple from mev_inspect.arbitrages import _get_shortest_route, get_arbitrages from mev_inspect.classifiers.specs.uniswap import ( UNISWAP_V2_PAIR_ABI_NAME, UNISWAP_V3_POOL_ABI_NAME, ) from mev_inspect.schemas.swaps import Swap def _assert_route_tokens_equal( route: List[Swap], ...
route[i].token_in_address
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_arbitrages.py
_assert_route_tokens_equal
assert
complex_expr
21
from typing import List, Tuple from mev_inspect.arbitrages import _get_shortest_route, get_arbitrages from mev_inspect.classifiers.specs.uniswap import ( UNISWAP_V2_PAIR_ABI_NAME, UNISWAP_V3_POOL_ABI_NAME, ) from mev_inspect.schemas.swaps import Swap def _assert_route_tokens_equal( route: List[Swap], ...
route[i].token_out_address
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_arbitrages.py
_assert_route_tokens_equal
assert
func_call
15
from typing import List, Tuple from mev_inspect.arbitrages import _get_shortest_route, get_arbitrages from mev_inspect.classifiers.specs.uniswap import ( UNISWAP_V2_PAIR_ABI_NAME, UNISWAP_V3_POOL_ABI_NAME, ) from mev_inspect.schemas.swaps import Swap def _assert_route_tokens_equal( route: List[Swap], ...
len(expected_token_in_out_pairs)
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_compound.py
test_c_ether_liquidations
assert
variable
34
from mev_inspect.classifiers.trace import TraceClassifier from mev_inspect.compound_liquidations import get_compound_liquidations from mev_inspect.schemas.liquidations import Liquidation from mev_inspect.schemas.traces import Protocol from tests.utils import load_comp_markets, load_cream_markets, load_test_block comp_...
liquidations
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_decode.py
test_decode_function_with_simple_argument
assert
variable
30
import pydantic from mev_inspect import decode from mev_inspect.schemas import abi def test_decode_function_with_simple_argument(): test_function_name = "testFunction" test_parameter_name = "testParameter" test_abi = pydantic.parse_obj_as( abi.ABI, [ { "name": t...
test_function_name
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_decode.py
test_decode_function_with_simple_argument
assert
string_literal
31
import pydantic from mev_inspect import decode from mev_inspect.schemas import abi def test_decode_function_with_simple_argument(): test_function_name = "testFunction" test_parameter_name = "testParameter" test_abi = pydantic.parse_obj_as( abi.ABI, [ { "name": t...
"testFunction(uint256)"
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_decode.py
test_decode_function_with_tuple_argument
assert
collection
41
import pydantic from mev_inspect import decode from mev_inspect.schemas import abi def test_decode_function_with_tuple_argument(): test_function_name = "testFunction" test_tuple_name = "testTuple" test_parameter_name = "testParameter" test_abi = pydantic.parse_obj_as( abi.ABI, [ ...
{test_tuple_name: (1,)}
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_decode.py
test_decode_function_with_simple_argument
assert
collection
32
import pydantic from mev_inspect import decode from mev_inspect.schemas import abi def test_decode_function_with_simple_argument(): test_function_name = "testFunction" test_parameter_name = "testParameter" test_abi = pydantic.parse_obj_as( abi.ABI, [ { "name": t...
{test_parameter_name: 1}
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_decode.py
test_decode_function_with_tuple_argument
assert
string_literal
40
import pydantic from mev_inspect import decode from mev_inspect.schemas import abi def test_decode_function_with_tuple_argument(): test_function_name = "testFunction" test_tuple_name = "testTuple" test_parameter_name = "testParameter" test_abi = pydantic.parse_obj_as( abi.ABI, [ ...
"testFunction((uint256))"
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_sandwiches_integration.py
test_arbitrage_real_block
assert
numeric_literal
16
from mev_inspect.classifiers.trace import TraceClassifier from mev_inspect.sandwiches import get_sandwiches from mev_inspect.swaps import get_swaps from .utils import load_test_block, load_test_sandwiches def test_arbitrage_real_block(): block = load_test_block(12775690) expected_sandwiches = load_test_sandwi...
21
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_sandwiches_integration.py
test_arbitrage_real_block
assert
variable
19
from mev_inspect.classifiers.trace import TraceClassifier from mev_inspect.sandwiches import get_sandwiches from mev_inspect.swaps import get_swaps from .utils import load_test_block, load_test_sandwiches def test_arbitrage_real_block(): block = load_test_block(12775690) expected_sandwiches = load_test_sandwi...
expected_sandwiches
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_swaps.py
test_swaps
assert
numeric_literal
183
from mev_inspect.classifiers.specs.balancer import BALANCER_V1_POOL_ABI_NAME from mev_inspect.classifiers.specs.bancor import ( BANCOR_NETWORK_ABI_NAME, BANCOR_NETWORK_CONTRACT_ADDRESS, ) from mev_inspect.classifiers.specs.uniswap import ( UNISWAP_V2_PAIR_ABI_NAME, UNISWAP_V3_POOL_ABI_NAME, ) from mev_i...
4
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_swaps.py
test_swaps
assert
collection
213
from mev_inspect.classifiers.specs.balancer import BALANCER_V1_POOL_ABI_NAME from mev_inspect.classifiers.specs.bancor import ( BANCOR_NETWORK_ABI_NAME, BANCOR_NETWORK_CONTRACT_ADDRESS, ) from mev_inspect.classifiers.specs.uniswap import ( UNISWAP_V2_PAIR_ABI_NAME, UNISWAP_V3_POOL_ABI_NAME, ) from mev_i...
[]
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_swaps.py
test_swaps
assert
collection
200
from mev_inspect.classifiers.specs.balancer import BALANCER_V1_POOL_ABI_NAME from mev_inspect.classifiers.specs.bancor import ( BANCOR_NETWORK_ABI_NAME, BANCOR_NETWORK_CONTRACT_ADDRESS, ) from mev_inspect.classifiers.specs.uniswap import ( UNISWAP_V2_PAIR_ABI_NAME, UNISWAP_V3_POOL_ABI_NAME, ) from mev_i...
[1]
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/test_swaps.py
test_swaps
assert
collection
226
from mev_inspect.classifiers.specs.balancer import BALANCER_V1_POOL_ABI_NAME from mev_inspect.classifiers.specs.bancor import ( BANCOR_NETWORK_ABI_NAME, BANCOR_NETWORK_CONTRACT_ADDRESS, ) from mev_inspect.classifiers.specs.uniswap import ( UNISWAP_V2_PAIR_ABI_NAME, UNISWAP_V3_POOL_ABI_NAME, ) from mev_i...
[6]
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/tokenflow_test.py
test_simple_arb
self.assertEqual
collection
16
import unittest from mev_inspect import tokenflow from .utils import load_test_block class TestTokenFlow(unittest.TestCase): def test_simple_arb(self): tx_hash = "0x4121ce805d33e952b2e6103a5024f70c118432fd0370128d6d7845f9b2987922" block_no = 11930296 block = load_test_block(block_no) ...
[0, 0])
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/tokenflow_test.py
test_arb_with_stable_flow
self.assertEqual
collection
17
import unittest from mev_inspect import tokenflow from .utils import load_test_block class TestTokenFlow(unittest.TestCase): def test_arb_with_stable_flow(self): tx_hash = "0x496836e0bd1520388e36c79d587a31d4b3306e4f25352164178ca0667c7f9c29" block_no = 11935012 block = load_test_block(bl...
[871839781, 871839781])
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/tokenflow_test.py
test_arb_with_stable_flow
self.assertEqual
collection
16
import unittest from mev_inspect import tokenflow from .utils import load_test_block class TestTokenFlow(unittest.TestCase): def test_arb_with_stable_flow(self): tx_hash = "0x496836e0bd1520388e36c79d587a31d4b3306e4f25352164178ca0667c7f9c29" block_no = 11935012 block = load_test_block(bl...
[597044987302243493, 562445964778930176])
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/tokenflow_test.py
test_simple_arb
self.assertEqual
collection
15
import unittest from mev_inspect import tokenflow from .utils import load_test_block class TestTokenFlow(unittest.TestCase): def test_simple_arb(self): tx_hash = "0x4121ce805d33e952b2e6103a5024f70c118432fd0370128d6d7845f9b2987922" block_no = 11930296 block = load_test_block(block_no) ...
[3547869861992962562, 3499859860420296704])
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
flashbots/mev-inspect-py
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
train
train
tests/tokenflow_test.py
test_complex_cross_arb
self.assertEqual
collection
15
import unittest from mev_inspect import tokenflow from .utils import load_test_block class TestTokenFlow(unittest.TestCase): def test_complex_cross_arb(self): tx_hash = "0x5ab21bfba50ad3993528c2828c63e311aafe93b40ee934790e545e150cb6ca73" block_no = 11931272 block = load_test_block(block_...
[3636400213125714803, 3559576672903063566])
7b44046926a04ffee3a65c4d1afb95758cc0369b
35
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/functional/cli/test_cli.py
test_cli_help
assert
numeric_literal
18
from __future__ import annotations import uuid from pathlib import Path from typing import TYPE_CHECKING import pytest from click.testing import CliRunner from deptry.cli import deptry from tests.functional.utils import Project from tests.utils import get_issues_report, stylize def test_cli_help() -> None: resu...
0
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/functional/cli/test_cli.py
test_cli_returns_error
assert
numeric_literal
21
from __future__ import annotations import uuid from pathlib import Path from typing import TYPE_CHECKING import pytest from click.testing import CliRunner from deptry.cli import deptry from tests.functional.utils import Project from tests.utils import get_issues_report, stylize @pytest.mark.xdist_group(name=Project...
1
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/functional/cli/test_cli.py
test_cli_not_verbose
assert
complex_expr
22
from __future__ import annotations import uuid from pathlib import Path from typing import TYPE_CHECKING import pytest from click.testing import CliRunner from deptry.cli import deptry from tests.functional.utils import Project from tests.utils import get_issues_report, stylize @pytest.mark.xdist_group(name=Project...
result.stderr
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/functional/cli/test_cli.py
test_cli_with_not_json_output
assert
variable
53
from __future__ import annotations import uuid from pathlib import Path from typing import TYPE_CHECKING import pytest from click.testing import CliRunner from deptry.cli import deptry from tests.functional.utils import Project from tests.utils import get_issues_report, stylize @pytest.mark.xdist_group(name=Project...
json_files_count
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/functional/cli/test_cli.py
test_cli_with_no_ansi
assert
string_literal
34
from __future__ import annotations import uuid from pathlib import Path from typing import TYPE_CHECKING import pytest from click.testing import CliRunner from deptry.cli import deptry from tests.functional.utils import Project from tests.utils import get_issues_report, stylize @pytest.mark.xdist_group(name=Project...
"\n".join(expected_output)
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/functional/cli/test_cli_gitignore.py
test_cli_gitignore_is_used
assert
numeric_literal
19
from __future__ import annotations import uuid from pathlib import Path from typing import TYPE_CHECKING import pytest from tests.functional.utils import Project from tests.utils import get_issues_report @pytest.mark.xdist_group(name=Project.GITIGNORE) def test_cli_gitignore_is_used(pip_venv_factory: PipVenvFactory...
1
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/functional/cli/test_cli_multiple_source_directories.py
test_cli_with_multiple_source_directories
assert
numeric_literal
19
from __future__ import annotations import uuid from pathlib import Path from typing import TYPE_CHECKING import pytest from tests.functional.utils import Project from tests.utils import get_issues_report @pytest.mark.xdist_group(name=Project.MULTIPLE_SOURCE_DIRECTORIES) def test_cli_with_multiple_source_directories...
1
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/functional/cli/test_cli_pdm.py
test_cli_with_pdm
assert
numeric_literal
19
from __future__ import annotations import uuid from pathlib import Path from typing import TYPE_CHECKING import pytest from tests.functional.utils import Project from tests.utils import get_issues_report @pytest.mark.xdist_group(name=Project.PDM) def test_cli_with_pdm(pdm_venv_factory: PDMVenvFactory) -> None: ...
1
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/functional/cli/test_cli_pep_621.py
test_cli_with_pep_621
assert
numeric_literal
19
from __future__ import annotations import uuid from pathlib import Path from typing import TYPE_CHECKING import pytest from tests.functional.utils import Project from tests.utils import get_issues_report @pytest.mark.xdist_group(name=Project.PEP_621) def test_cli_with_pep_621(pip_venv_factory: PipVenvFactory) -> No...
1
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/functional/cli/test_cli_poetry.py
test_cli_with_poetry
assert
numeric_literal
19
from __future__ import annotations import uuid from pathlib import Path from typing import TYPE_CHECKING import pytest from tests.functional.utils import Project from tests.utils import get_issues_report @pytest.mark.xdist_group(name=Project.POETRY) def test_cli_with_poetry(poetry_venv_factory: PoetryVenvFactory) -...
1
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/functional/cli/test_cli_pyproject_different_directory.py
test_cli_with_pyproject_different_directory
assert
numeric_literal
21
from __future__ import annotations import uuid from pathlib import Path from typing import TYPE_CHECKING import pytest from tests.functional.utils import Project from tests.utils import get_issues_report @pytest.mark.xdist_group(name=Project.PYPROJECT_DIFFERENT_DIRECTORY) def test_cli_with_pyproject_different_direc...
1
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/functional/cli/test_cli_requirements_in.py
test_cli_single_requirements_files
assert
numeric_literal
26
from __future__ import annotations import uuid from pathlib import Path from typing import TYPE_CHECKING import pytest from tests.functional.utils import Project from tests.utils import get_issues_report @pytest.mark.xdist_group(name=Project.REQUIREMENTS_IN) def test_cli_single_requirements_files(pip_venv_factory: ...
1
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/functional/cli/test_cli_requirements_txt.py
test_cli_single_requirements_files
assert
numeric_literal
27
from __future__ import annotations import uuid from pathlib import Path from typing import TYPE_CHECKING import pytest from tests.functional.utils import Project from tests.utils import get_issues_report @pytest.mark.xdist_group(name=Project.REQUIREMENTS_TXT) def test_cli_single_requirements_files(pip_venv_factory:...
1
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/functional/cli/test_cli_src_directory.py
test_cli_with_src_directory
assert
numeric_literal
19
from __future__ import annotations import uuid from pathlib import Path from typing import TYPE_CHECKING import pytest from tests.functional.utils import Project from tests.utils import get_issues_report @pytest.mark.xdist_group(name=Project.SRC_DIRECTORY) def test_cli_with_src_directory(pip_venv_factory: PipVenvFa...
1
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_builder.py
test_check_for_requirements_in_file_with_requirements_in
assert
complex_expr
44
from __future__ import annotations import logging import re from pathlib import Path from typing import TYPE_CHECKING import pytest from deptry.dependency_getter.builder import DependencyGetterBuilder from deptry.dependency_getter.pdm import PDMDependencyGetter from deptry.dependency_getter.pep_621 import PEP621Depe...
caplog.text
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_builder.py
test_check_for_requirements_in_file_with_requirements_in
assert
collection
36
from __future__ import annotations import logging import re from pathlib import Path from typing import TYPE_CHECKING import pytest from deptry.dependency_getter.builder import DependencyGetterBuilder from deptry.dependency_getter.pdm import PDMDependencyGetter from deptry.dependency_getter.pep_621 import PEP621Depe...
("requirements.in",)
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_builder.py
test_dependency_specification_not_found_raises_exception
pytest.raises
func_call
26
from __future__ import annotations import logging import re from pathlib import Path from typing import TYPE_CHECKING import pytest from deptry.dependency_getter.builder import DependencyGetterBuilder from deptry.dependency_getter.pdm import PDMDependencyGetter from deptry.dependency_getter.pep_621 import PEP621Depe...
DependencySpecificationNotFoundError, match=re.escape( "No file called 'pyproject.toml' with a [tool.poetry.dependencies], [tool.pdm] or [project] section or" " file(s) called 'req/req.txt' found. Exiting." ))
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_builder.py
test_dependency_specification_not_found_raises_exception
assert
collection
35
from __future__ import annotations import logging import re from pathlib import Path from typing import TYPE_CHECKING import pytest from deptry.dependency_getter.builder import DependencyGetterBuilder from deptry.dependency_getter.pdm import PDMDependencyGetter from deptry.dependency_getter.pep_621 import PEP621Depe...
[ "pyproject.toml found!", ( "pyproject.toml does not contain a [tool.poetry.dependencies] section, so Poetry is not used to specify the" " project's dependencies." ), ( "pyproject.toml does not contain a [tool.pdm.dev-dependencies] section, so PDM is not used to specify the" " project's dependencies." ), ( "pyproject....
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_pdm.py
test_dependency_getter
assert
numeric_literal
33
from __future__ import annotations from pathlib import Path from deptry.dependency_getter.pdm import PDMDependencyGetter from tests.utils import run_within_dir def test_dependency_getter(tmp_path: Path) -> None: fake_pyproject_toml = """\ [project] # PEP 621 project metadata # See https://www.python.org/dev/peps...
5
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_pdm.py
test_dev_dependency_getter
assert
numeric_literal
36
from __future__ import annotations from pathlib import Path from deptry.dependency_getter.pdm import PDMDependencyGetter from tests.utils import run_within_dir def test_dev_dependency_getter(tmp_path: Path) -> None: fake_pyproject_toml = """\ [project] # PEP 621 project metadata # See https://www.python.org/dev/...
3
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_pdm.py
test_dependency_getter
assert
string_literal
35
from __future__ import annotations from pathlib import Path from deptry.dependency_getter.pdm import PDMDependencyGetter from tests.utils import run_within_dir def test_dependency_getter(tmp_path: Path) -> None: fake_pyproject_toml = """\ [project] # PEP 621 project metadata # See https://www.python.org/dev/peps...
"qux"
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_pdm.py
test_dependency_getter
assert
string_literal
38
from __future__ import annotations from pathlib import Path from deptry.dependency_getter.pdm import PDMDependencyGetter from tests.utils import run_within_dir def test_dependency_getter(tmp_path: Path) -> None: fake_pyproject_toml = """\ [project] # PEP 621 project metadata # See https://www.python.org/dev/peps...
"bar"
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_pdm.py
test_dev_dependency_getter
assert
string_literal
44
from __future__ import annotations from pathlib import Path from deptry.dependency_getter.pdm import PDMDependencyGetter from tests.utils import run_within_dir def test_dev_dependency_getter(tmp_path: Path) -> None: fake_pyproject_toml = """\ [project] # PEP 621 project metadata # See https://www.python.org/dev/...
"foo-bar"
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_pdm.py
test_dependency_getter
assert
string_literal
47
from __future__ import annotations from pathlib import Path from deptry.dependency_getter.pdm import PDMDependencyGetter from tests.utils import run_within_dir def test_dependency_getter(tmp_path: Path) -> None: fake_pyproject_toml = """\ [project] # PEP 621 project metadata # See https://www.python.org/dev/peps...
"fox-python"
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_pdm.py
test_dependency_getter
assert
string_literal
41
from __future__ import annotations from pathlib import Path from deptry.dependency_getter.pdm import PDMDependencyGetter from tests.utils import run_within_dir def test_dependency_getter(tmp_path: Path) -> None: fake_pyproject_toml = """\ [project] # PEP 621 project metadata # See https://www.python.org/dev/peps...
"optional-foo"
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_pdm.py
test_dev_dependency_getter
assert
complex_expr
39
from __future__ import annotations from pathlib import Path from deptry.dependency_getter.pdm import PDMDependencyGetter from tests.utils import run_within_dir def test_dev_dependency_getter(tmp_path: Path) -> None: fake_pyproject_toml = """\ [project] # PEP 621 project metadata # See https://www.python.org/dev/...
dev_dependencies[0].top_levels
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_pep_621.py
test_dependency_getter
assert
numeric_literal
43
from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING from deptry.dependency_getter.pep_621 import PEP621DependencyGetter from tests.utils import run_within_dir def test_dependency_getter(tmp_path: Path) -> None: fake_pyproject_toml = """[project] # PEP 621 p...
8
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_pep_621.py
test_dependency_getter_with_dev_dependencies
assert
numeric_literal
36
from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING from deptry.dependency_getter.pep_621 import PEP621DependencyGetter from tests.utils import run_within_dir def test_dependency_getter_with_dev_dependencies(tmp_path: Path) -> None: fake_pyproject_toml = ""...
2
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_pep_621.py
test_dependency_getter_with_dev_dependencies
assert
numeric_literal
44
from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING from deptry.dependency_getter.pep_621 import PEP621DependencyGetter from tests.utils import run_within_dir def test_dependency_getter_with_dev_dependencies(tmp_path: Path) -> None: fake_pyproject_toml = ""...
1
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_pep_621.py
test_dependency_getter_with_incorrect_dev_group
assert
numeric_literal
40
from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING from deptry.dependency_getter.pep_621 import PEP621DependencyGetter from tests.utils import run_within_dir def test_dependency_getter_with_incorrect_dev_group(tmp_path: Path, caplog: LogCaptureFixture) -> None...
3
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_pep_621.py
test_dependency_getter
assert
string_literal
45
from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING from deptry.dependency_getter.pep_621 import PEP621DependencyGetter from tests.utils import run_within_dir def test_dependency_getter(tmp_path: Path) -> None: fake_pyproject_toml = """[project] # PEP 621 p...
"qux"
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_pep_621.py
test_dependency_getter
assert
string_literal
48
from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING from deptry.dependency_getter.pep_621 import PEP621DependencyGetter from tests.utils import run_within_dir def test_dependency_getter(tmp_path: Path) -> None: fake_pyproject_toml = """[project] # PEP 621 p...
"bar"
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_pep_621.py
test_dependency_getter
assert
string_literal
66
from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING from deptry.dependency_getter.pep_621 import PEP621DependencyGetter from tests.utils import run_within_dir def test_dependency_getter(tmp_path: Path) -> None: fake_pyproject_toml = """[project] # PEP 621 p...
"dep"
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_pep_621.py
test_dependency_getter
assert
string_literal
60
from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING from deptry.dependency_getter.pep_621 import PEP621DependencyGetter from tests.utils import run_within_dir def test_dependency_getter(tmp_path: Path) -> None: fake_pyproject_toml = """[project] # PEP 621 p...
"foobar"
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_pep_621.py
test_dependency_getter_with_dev_dependencies
assert
string_literal
45
from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING from deptry.dependency_getter.pep_621 import PEP621DependencyGetter from tests.utils import run_within_dir def test_dependency_getter_with_dev_dependencies(tmp_path: Path) -> None: fake_pyproject_toml = ""...
"barfoo"
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_pep_621.py
test_dependency_getter_with_incorrect_dev_group
assert
complex_expr
35
from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING from deptry.dependency_getter.pep_621 import PEP621DependencyGetter from tests.utils import run_within_dir def test_dependency_getter_with_incorrect_dev_group(tmp_path: Path, caplog: LogCaptureFixture) -> None...
caplog.text
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_poetry.py
test_dependency_getter
assert
numeric_literal
42
from __future__ import annotations from pathlib import Path from deptry.dependency_getter.poetry import PoetryDependencyGetter from tests.utils import run_within_dir def test_dependency_getter(tmp_path: Path) -> None: fake_pyproject_toml = """ [tool.poetry.dependencies] python = ">=3.7,<4.0" bar = { version = "...
3
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_poetry.py
test_dependency_getter
assert
numeric_literal
43
from __future__ import annotations from pathlib import Path from deptry.dependency_getter.poetry import PoetryDependencyGetter from tests.utils import run_within_dir def test_dependency_getter(tmp_path: Path) -> None: fake_pyproject_toml = """ [tool.poetry.dependencies] python = ">=3.7,<4.0" bar = { version = "...
6
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_poetry.py
test_dependency_getter
assert
string_literal
45
from __future__ import annotations from pathlib import Path from deptry.dependency_getter.poetry import PoetryDependencyGetter from tests.utils import run_within_dir def test_dependency_getter(tmp_path: Path) -> None: fake_pyproject_toml = """ [tool.poetry.dependencies] python = ">=3.7,<4.0" bar = { version = "...
"bar"
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_poetry.py
test_dependency_getter
assert
string_literal
57
from __future__ import annotations from pathlib import Path from deptry.dependency_getter.poetry import PoetryDependencyGetter from tests.utils import run_within_dir def test_dependency_getter(tmp_path: Path) -> None: fake_pyproject_toml = """ [tool.poetry.dependencies] python = ">=3.7,<4.0" bar = { version = "...
"qux"
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_poetry.py
test_dependency_getter
assert
string_literal
54
from __future__ import annotations from pathlib import Path from deptry.dependency_getter.poetry import PoetryDependencyGetter from tests.utils import run_within_dir def test_dependency_getter(tmp_path: Path) -> None: fake_pyproject_toml = """ [tool.poetry.dependencies] python = ">=3.7,<4.0" bar = { version = "...
"toml"
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_requirements_txt.py
test_parse_requirements_files
assert
numeric_literal
46
from __future__ import annotations from pathlib import Path import pytest from deptry.dependency_getter.requirements_files import RequirementsTxtDependencyGetter from tests.utils import run_within_dir def test_parse_requirements_files(tmp_path: Path) -> None: fake_requirements_files = """click==8.1.3 #123asd co...
0
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_requirements_txt.py
test_parse_requirements_files_urls
assert
numeric_literal
25
from __future__ import annotations from pathlib import Path import pytest from deptry.dependency_getter.requirements_files import RequirementsTxtDependencyGetter from tests.utils import run_within_dir def test_parse_requirements_files_urls(tmp_path: Path) -> None: fake_requirements_files = """urllib3 @ https://...
5
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_requirements_txt.py
test_single
assert
numeric_literal
21
from __future__ import annotations from pathlib import Path import pytest from deptry.dependency_getter.requirements_files import RequirementsTxtDependencyGetter from tests.utils import run_within_dir def test_single(tmp_path: Path) -> None: with run_within_dir(tmp_path): with Path("req.txt").open("w") ...
2
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_requirements_txt.py
test_parse_requirements_files
assert
numeric_literal
45
from __future__ import annotations from pathlib import Path import pytest from deptry.dependency_getter.requirements_files import RequirementsTxtDependencyGetter from tests.utils import run_within_dir def test_parse_requirements_files(tmp_path: Path) -> None: fake_requirements_files = """click==8.1.3 #123asd co...
19
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_requirements_txt.py
test_multiple
assert
string_literal
28
from __future__ import annotations from pathlib import Path import pytest from deptry.dependency_getter.requirements_files import RequirementsTxtDependencyGetter from tests.utils import run_within_dir def test_multiple(tmp_path: Path) -> None: with run_within_dir(tmp_path): with Path("foo.txt").open("w"...
"bar"
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_requirements_txt.py
test_single
assert
string_literal
24
from __future__ import annotations from pathlib import Path import pytest from deptry.dependency_getter.requirements_files import RequirementsTxtDependencyGetter from tests.utils import run_within_dir def test_single(tmp_path: Path) -> None: with run_within_dir(tmp_path): with Path("req.txt").open("w") ...
"click"
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/dependency_getter/test_requirements_txt.py
test__line_is_url
assert
variable
30
from __future__ import annotations from pathlib import Path import pytest from deptry.dependency_getter.requirements_files import RequirementsTxtDependencyGetter from tests.utils import run_within_dir @pytest.mark.parametrize( ("line", "expected"), [ ("foo", False), ("http", False), ...
expected
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/deprecate/test_requirements_txt.py
test_requirements_txt_deprecated
assert
numeric_literal
35
from __future__ import annotations from unittest.mock import ANY, patch from click.testing import CliRunner from deptry.cli import deptry from deptry.deprecate.requirements_txt import ( REQUIREMENTS_TXT_DEPRECATION_MESSAGE, REQUIREMENTS_TXT_DEV_DEPRECATION_MESSAGE, ) DEFAULT_CORE_ARGS = { "root": (ANY,)...
0
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/deprecate/test_requirements_txt.py
test_requirements_txt_deprecated
assert_*
variable
36
from __future__ import annotations from unittest.mock import ANY, patch from click.testing import CliRunner from deptry.cli import deptry from deptry.deprecate.requirements_txt import ( REQUIREMENTS_TXT_DEPRECATION_MESSAGE, REQUIREMENTS_TXT_DEV_DEPRECATION_MESSAGE, ) DEFAULT_CORE_ARGS = { "root": (ANY,)...
REQUIREMENTS_TXT_DEPRECATION_MESSAGE)
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/deprecate/test_requirements_txt.py
test_requirements_txt_dev_deprecated
assert_*
variable
36
from __future__ import annotations from unittest.mock import ANY, patch from click.testing import CliRunner from deptry.cli import deptry from deptry.deprecate.requirements_txt import ( REQUIREMENTS_TXT_DEPRECATION_MESSAGE, REQUIREMENTS_TXT_DEV_DEPRECATION_MESSAGE, ) DEFAULT_CORE_ARGS = { "root": (ANY,)...
REQUIREMENTS_TXT_DEV_DEPRECATION_MESSAGE)
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/imports/test_extract.py
test_python_3_12_f_string_syntax
assert
collection
24
from __future__ import annotations import json import logging import re import uuid from pathlib import Path from typing import TYPE_CHECKING import pytest from deptry.imports.extract import get_imported_modules_from_list_of_files from deptry.imports.location import Location from tests.utils import run_within_dir d...
{"foo": [Location(file_path, 1, 8)]}
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/imports/test_extract.py
test_import_parser_file_encodings
assert
collection
45
from __future__ import annotations import json import logging import re import uuid from pathlib import Path from typing import TYPE_CHECKING import pytest from deptry.imports.extract import get_imported_modules_from_list_of_files from deptry.imports.location import Location from tests.utils import run_within_dir @...
{"foo": [Location(random_file, 2, 8)]}
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/imports/test_extract.py
test_import_parser_file_encodings_ipynb
assert
collection
54
from __future__ import annotations import json import logging import re import uuid from pathlib import Path from typing import TYPE_CHECKING import pytest from deptry.imports.extract import get_imported_modules_from_list_of_files from deptry.imports.location import Location from tests.utils import run_within_dir @...
{"foo": [Location(random_file, 1, 8)]}
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/imports/test_extract.py
test_import_parser_errors
assert
collection
33
from __future__ import annotations import json import logging import re import uuid from pathlib import Path from typing import TYPE_CHECKING import pytest from deptry.imports.extract import get_imported_modules_from_list_of_files from deptry.imports.location import Location from tests.utils import run_within_dir d...
{"black": [Location(file=Path("file_ok.py"), line=1, column=8)]}
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/imports/test_extract.py
test_import_parser_for_ipynb_errors
assert
collection
48
from __future__ import annotations import json import logging import re import uuid from pathlib import Path from typing import TYPE_CHECKING import pytest from deptry.imports.extract import get_imported_modules_from_list_of_files from deptry.imports.location import Location from tests.utils import run_within_dir d...
{"numpy": [Location(file=Path("notebook_ok.ipynb"), line=1, column=8)]}
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/imports/test_extract.py
test_import_parser_ipynb
assert
collection
20
from __future__ import annotations import json import logging import re import uuid from pathlib import Path from typing import TYPE_CHECKING import pytest from deptry.imports.extract import get_imported_modules_from_list_of_files from deptry.imports.location import Location from tests.utils import run_within_dir d...
{ "click": [Location(notebook_path, 4, 8)], "toml": [Location(notebook_path, 6, 8)], "urllib3": [Location(notebook_path, 5, 1)], }
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/reporters/test_text.py
test__get_colors
assert
variable
31
from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING import pytest from deptry.dependency import Dependency from deptry.imports.location import Location from deptry.module import Module from deptry.reporters import TextReporter from deptry.reporters.text import ...
expected
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/reporters/test_text.py
test_logging_number_none
assert
collection
27
from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING import pytest from deptry.dependency import Dependency from deptry.imports.location import Location from deptry.module import Module from deptry.reporters import TextReporter from deptry.reporters.text import ...
[ "", stylize("{BOLD}{GREEN}Success! No dependency issues found.{RESET}"), ]
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/reporters/test_text.py
test_logging_number_single
assert
collection
29
from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING import pytest from deptry.dependency import Dependency from deptry.imports.location import Location from deptry.module import Module from deptry.reporters import TextReporter from deptry.reporters.text import ...
[ "", stylize( "{BOLD}{file}{RESET}{CYAN}:{RESET}1{CYAN}:{RESET}2{CYAN}:{RESET} {BOLD}{RED}DEP001{RESET} 'foo'" " imported but missing from the dependency definitions", file=Path("foo.py"), ), stylize("{BOLD}{RED}Found 1 dependency issue.{RESET}"), "\nFor more information, see the documentation: https://deptry.com/", ]
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/test_cli.py
test_comma_separated_tuple_param_type_convert
assert
variable
73
from __future__ import annotations import re from typing import TYPE_CHECKING from unittest import mock import click import pytest from deptry.cli import CommaSeparatedMappingParamType, CommaSeparatedTupleParamType @pytest.mark.parametrize( ("value", "expected"), [ pytest.param( "", ...
expected
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/test_cli.py
test_comma_separated_mapping_param_type_convert_err
pytest.raises
complex_expr
40
from __future__ import annotations import re from typing import TYPE_CHECKING from unittest import mock import click import pytest from deptry.cli import CommaSeparatedMappingParamType, CommaSeparatedTupleParamType @pytest.mark.parametrize( ("value", "err_type", "err_msg_matcher"), [ pytest.param( ...
err_type, match=err_msg_matcher)
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/test_config.py
test_read_configuration_from_pyproject_toml_file_not_found
assert
complex_expr
40
from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING import click import pytest from click import Argument from deptry.config import read_configuration_from_pyproject_toml from deptry.exceptions import InvalidPyprojectTOMLOptionsError from tests.utils import run...
caplog.text
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/test_config.py
test_read_configuration_from_pyproject_toml_exists
assert
variable
66
from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING import click import pytest from click import Argument from deptry.config import read_configuration_from_pyproject_toml from deptry.exceptions import InvalidPyprojectTOMLOptionsError from tests.utils import run...
pyproject_toml_path
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/test_config.py
test_read_configuration_from_pyproject_toml_file_without_deptry_section
assert
func_call
44
from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING import click import pytest from click import Argument from deptry.config import read_configuration_from_pyproject_toml from deptry.exceptions import InvalidPyprojectTOMLOptionsError from tests.utils import run...
Path("pyproject.toml")
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/test_config.py
test_read_configuration_from_pyproject_toml_file_with_invalid_options
pytest.raises
variable
46
from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING import click import pytest from click import Argument from deptry.config import read_configuration_from_pyproject_toml from deptry.exceptions import InvalidPyprojectTOMLOptionsError from tests.utils import run...
InvalidPyprojectTOMLOptionsError)
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/test_config.py
test_read_configuration_from_pyproject_toml_exists
assert
collection
71
from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING import click import pytest from click import Argument from deptry.config import read_configuration_from_pyproject_toml from deptry.exceptions import InvalidPyprojectTOMLOptionsError from tests.utils import run...
{ "exclude": ["foo", "bar"], "extend_exclude": ["bar", "foo"], "ignore_notebooks": True, "per_rule_ignores": { "DEP001": ["baz", "foobar"], "DEP002": ["foo"], "DEP003": ["foobaz"], "DEP004": ["barfoo"], }, "ignore": ["DEP001", "DEP002", "DEP003", "DEP004"], "requirements_files": "foo.txt", "requirements_files_dev": ["d...
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/test_core.py
test__exit_with_violations
assert
numeric_literal
39
from __future__ import annotations import logging import re import sys from pathlib import Path from unittest import mock import pytest from deptry.core import Core from deptry.dependency import Dependency from deptry.dependency_getter.base import DependenciesExtract from deptry.exceptions import UnsupportedPythonVe...
1
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/test_core.py
test__exit_without_violations
assert
numeric_literal
32
from __future__ import annotations import logging import re import sys from pathlib import Path from unittest import mock import pytest from deptry.core import Core from deptry.dependency import Dependency from deptry.dependency_getter.base import DependenciesExtract from deptry.exceptions import UnsupportedPythonVe...
0
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor
fpgmaas/deptry
53185adfcbfc628ef66705835bf5715a4fab61b0
121
train
train
tests/unit/test_core.py
test__get_local_modules
assert
variable
60
from __future__ import annotations import logging import re import sys from pathlib import Path from unittest import mock import pytest from deptry.core import Core from deptry.dependency import Dependency from deptry.dependency_getter.base import DependenciesExtract from deptry.exceptions import UnsupportedPythonVe...
expected
53185adfcbfc628ef66705835bf5715a4fab61b0
121
v2_extractor_at_anchor