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
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/io/test_json_unicode.py
test_json_unicode
assert
complex_expr
24
from __future__ import absolute_import, print_function, division import json from tempfile import NamedTemporaryFile from petl.test.helpers import ieq from petl.io.json import tojson, fromjson def test_json_unicode(): tbl = ((u'id', u'name'), (1, u'Արամ Խաչատրյան'), (2, u'Johann Strauß'), ...
b['id']
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/io/test_json_unicode.py
test_json_unicode
assert
complex_expr
25
from __future__ import absolute_import, print_function, division import json from tempfile import NamedTemporaryFile from petl.test.helpers import ieq from petl.io.json import tojson, fromjson def test_json_unicode(): tbl = ((u'id', u'name'), (1, u'Արամ Խաչատրյան'), (2, u'Johann Strauß'), ...
b['name']
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/io/test_numpy.py
test_torecarray
assert_*
complex_expr
26
from __future__ import absolute_import, print_function, division import sys import petl as etl from petl.test.helpers import ieq, eq_, assert_almost_equal from petl.io.numpy import toarray, fromarray, torecarray def test_torecarray(): t = [('foo', 'bar', 'baz'), ('apples', 1, 2.5), ...
a.baz[0])
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/io/test_numpy.py
test_torecarray
assert_*
complex_expr
27
from __future__ import absolute_import, print_function, division import sys import petl as etl from petl.test.helpers import ieq, eq_, assert_almost_equal from petl.io.numpy import toarray, fromarray, torecarray def test_torecarray(): t = [('foo', 'bar', 'baz'), ('apples', 1, 2.5), ...
a.baz[1])
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/io/test_numpy.py
test_torecarray
assert_*
complex_expr
28
from __future__ import absolute_import, print_function, division import sys import petl as etl from petl.test.helpers import ieq, eq_, assert_almost_equal from petl.io.numpy import toarray, fromarray, torecarray def test_torecarray(): t = [('foo', 'bar', 'baz'), ('apples', 1, 2.5), ...
a.baz[2])
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/io/test_numpy.py
test_toarray_explicitdtype
assert_*
complex_expr
26
from __future__ import absolute_import, print_function, division import sys import petl as etl from petl.test.helpers import ieq, eq_, assert_almost_equal from petl.io.numpy import toarray, fromarray, torecarray def test_toarray_explicitdtype(): t = [('foo', 'bar', 'baz'), ('apples', 1, 2.5)...
a['C'][0])
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/io/test_numpy.py
test_toarray_explicitdtype
assert_*
complex_expr
27
from __future__ import absolute_import, print_function, division import sys import petl as etl from petl.test.helpers import ieq, eq_, assert_almost_equal from petl.io.numpy import toarray, fromarray, torecarray def test_toarray_explicitdtype(): t = [('foo', 'bar', 'baz'), ('apples', 1, 2.5)...
a['C'][1])
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/io/test_numpy.py
test_toarray_explicitdtype
assert_*
complex_expr
28
from __future__ import absolute_import, print_function, division import sys import petl as etl from petl.test.helpers import ieq, eq_, assert_almost_equal from petl.io.numpy import toarray, fromarray, torecarray def test_toarray_explicitdtype(): t = [('foo', 'bar', 'baz'), ('apples', 1, 2.5)...
a['C'][2])
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/io/test_numpy.py
test_toarray_nodtype
assert_*
complex_expr
26
from __future__ import absolute_import, print_function, division import sys import petl as etl from petl.test.helpers import ieq, eq_, assert_almost_equal from petl.io.numpy import toarray, fromarray, torecarray def test_toarray_nodtype(): t = [('foo', 'bar', 'baz'), ('apples', 1, 2.5), ...
a['baz'][0])
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/io/test_numpy.py
test_toarray_nodtype
assert_*
complex_expr
27
from __future__ import absolute_import, print_function, division import sys import petl as etl from petl.test.helpers import ieq, eq_, assert_almost_equal from petl.io.numpy import toarray, fromarray, torecarray def test_toarray_nodtype(): t = [('foo', 'bar', 'baz'), ('apples', 1, 2.5), ...
a['baz'][1])
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/io/test_numpy.py
test_toarray_nodtype
assert_*
complex_expr
28
from __future__ import absolute_import, print_function, division import sys import petl as etl from petl.test.helpers import ieq, eq_, assert_almost_equal from petl.io.numpy import toarray, fromarray, torecarray def test_toarray_nodtype(): t = [('foo', 'bar', 'baz'), ('apples', 1, 2.5), ...
a['baz'][2])
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/io/test_xml.py
test_fromxml_url
assert
numeric_literal
15
from __future__ import absolute_import, print_function, division from tempfile import NamedTemporaryFile import sys from petl.test.helpers import ieq from petl.util import nrows, look from petl.io.xml import fromxml from petl.compat import urlopen def test_fromxml_url(): tbl = fromxml(url, './/item'...
0
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/transform/test_headers.py
test_rename_strict
assert
collection
34
from __future__ import absolute_import, print_function, division from petl.test.helpers import ieq from petl.errors import FieldSelectionError from petl.util import fieldnames from petl.transform.headers import setheader, extendheader, pushheader, skip,\ rename, prefixheader, suffixheader def test_rename_strict()...
('foo', 'bar')
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/transform/test_headers.py
test_rename
assert
collection
27
from __future__ import absolute_import, print_function, division from petl.test.helpers import ieq from petl.errors import FieldSelectionError from petl.util import fieldnames from petl.transform.headers import setheader, extendheader, pushheader, skip,\ rename, prefixheader, suffixheader def test_rename(): ...
('baz', 'quux')
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/transform/test_headers.py
test_rename
assert
collection
31
from __future__ import absolute_import, print_function, division from petl.test.helpers import ieq from petl.errors import FieldSelectionError from petl.util import fieldnames from petl.transform.headers import setheader, extendheader, pushheader, skip,\ rename, prefixheader, suffixheader def test_rename(): ...
('spong', 'bar')
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/transform/test_headers.py
test_rename
assert
collection
18
from __future__ import absolute_import, print_function, division from petl.test.helpers import ieq from petl.errors import FieldSelectionError from petl.util import fieldnames from petl.transform.headers import setheader, extendheader, pushheader, skip,\ rename, prefixheader, suffixheader def test_rename(): ...
('foofoo', 'bar')
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/transform/test_headers.py
test_rename
assert
collection
24
from __future__ import absolute_import, print_function, division from petl.test.helpers import ieq from petl.errors import FieldSelectionError from petl.util import fieldnames from petl.transform.headers import setheader, extendheader, pushheader, skip,\ rename, prefixheader, suffixheader def test_rename(): ...
('foofoo', 'barbar')
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/transform/test_selects.py
test_facet
assert
func_call
19
from __future__ import absolute_import, print_function, division from petl.test.helpers import ieq, eq_ from petl.comparison import Comparable from petl.transform.selects import select, selectin, selectcontains, \ rowlenselect, selectusingcontext, facet, selectgt, selectlt def test_facet(): table = (('foo', ...
set(['a', 'b', 'c', 'd'])
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/transform/test_selects.py
test_facet_2
assert
func_call
19
from __future__ import absolute_import, print_function, division from petl.test.helpers import ieq, eq_ from petl.comparison import Comparable from petl.transform.selects import select, selectin, selectcontains, \ rowlenselect, selectusingcontext, facet, selectgt, selectlt def test_facet_2(): table = (('foo'...
set(['aa', 'bb', 'cc', 'dd'])
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/util/test_parsers.py
test_numparser
assert
numeric_literal
11
from __future__ import absolute_import, print_function, division from petl.compat import maxint from petl.test.helpers import eq_ from petl.util.parsers import numparser, datetimeparser def test_numparser(): parsenumber = numparser() assert parsenumber('1') ==
1
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/util/test_parsers.py
test_numparser
assert
numeric_literal
12
from __future__ import absolute_import, print_function, division from petl.compat import maxint from petl.test.helpers import eq_ from petl.util.parsers import numparser, datetimeparser def test_numparser(): parsenumber = numparser() assert parsenumber('1') == 1 assert parsenumber('1.0') ==
1.0
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/util/test_parsers.py
test_numparser
assert
none_literal
16
from __future__ import absolute_import, print_function, division from petl.compat import maxint from petl.test.helpers import eq_ from petl.util.parsers import numparser, datetimeparser def test_numparser(): parsenumber = numparser() assert parsenumber('1') == 1 assert parsenumber('1.0') == 1.0 asser...
None
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/util/test_parsers.py
test_numparser
assert
string_literal
15
from __future__ import absolute_import, print_function, division from petl.compat import maxint from petl.test.helpers import eq_ from petl.util.parsers import numparser, datetimeparser def test_numparser(): parsenumber = numparser() assert parsenumber('1') == 1 assert parsenumber('1.0') == 1.0 asser...
'aaa'
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/util/test_parsers.py
test_numparser
assert
complex_expr
14
from __future__ import absolute_import, print_function, division from petl.compat import maxint from petl.test.helpers import eq_ from petl.util.parsers import numparser, datetimeparser def test_numparser(): parsenumber = numparser() assert parsenumber('1') == 1 assert parsenumber('1.0') == 1.0 asser...
3 + 4j
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/util/test_parsers.py
test_numparser_strict
assert
complex_expr
13
from __future__ import absolute_import, print_function, division from petl.compat import maxint from petl.test.helpers import eq_ from petl.util.parsers import numparser, datetimeparser def test_numparser_strict(): parsenumber = numparser(strict=True) assert parsenumber('1') == 1 assert parsenumber('1.0'...
maxint + 1
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/fakes/component.py
__init__
assert
numeric_literal
21
import enum import pathlib from typing import DefaultDict, Dict, List, Optional, Sequence, Tuple from pysen import ComponentBase from pysen.command import CommandBase from pysen.diagnostic import Diagnostic from pysen.reporter import Reporter from pysen.runner_options import PathContext, RunOptions from pysen.setting ...
1
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/fakes/component.py
export_settings
assert
complex_expr
38
import enum import pathlib from typing import DefaultDict, Dict, List, Optional, Sequence, Tuple from pysen import ComponentBase from pysen.command import CommandBase from pysen.diagnostic import Diagnostic from pysen.reporter import Reporter from pysen.runner_options import PathContext, RunOptions from pysen.setting ...
self._expected_base_dir
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/fakes/component.py
export_settings
assert
complex_expr
40
import enum import pathlib from typing import DefaultDict, Dict, List, Optional, Sequence, Tuple from pysen import ComponentBase from pysen.command import CommandBase from pysen.diagnostic import Diagnostic from pysen.reporter import Reporter from pysen.runner_options import PathContext, RunOptions from pysen.setting ...
self._expected_settings_dir
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/fakes/configs/error_builder.py
build
assert
none_literal
10
import pathlib from typing import Optional, Sequence from pysen import ComponentBase, Manifest, ManifestBase, Source, factory def build( # type: ignore components: Sequence[ComponentBase], src_path: Optional[pathlib.Path] ) -> ManifestBase: assert src_path is not
None
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/fakes/configs/invalid_interface_builder.py
build2
assert
none_literal
10
import pathlib from typing import Optional, Sequence from pysen import ComponentBase, Manifest, ManifestBase, Source, factory def build2( components: Sequence[ComponentBase], src_path: Optional[pathlib.Path] ) -> ManifestBase: assert src_path is not
None
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/fakes/manifest.py
export_settings
assert
complex_expr
51
import argparse import pathlib from typing import Dict, List, Mapping, Optional, Sequence from pysen.command import CommandBase from pysen.manifest import ( ComponentName, ManifestBase, ParserType, TargetName, TargetType, ) from pysen.runner_options import PathContext, RunOptions class FakeManifes...
self._expected_base_dir
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/fakes/manifest.py
export_settings
assert
complex_expr
53
import argparse import pathlib from typing import Dict, List, Mapping, Optional, Sequence from pysen.command import CommandBase from pysen.manifest import ( ComponentName, ManifestBase, ParserType, TargetName, TargetType, ) from pysen.runner_options import PathContext, RunOptions class FakeManifes...
self._expected_settings_dir
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_black.py
test__parse_file_path
assert
func_call
10
from pathlib import Path from pysen.ext.black_wrapper import _parse_file_path def test__parse_file_path() -> None: black_format = ( "path/test_error_line_parser.py 2020-06-01 07:19:58.515112 +0000" ) assert _parse_file_path(black_format) ==
Path("path/test_error_line_parser.py")
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_cli_config.py
test_example
assert
none_literal
11
import pathlib from pysen.cli_config import parse BASE_DIR = pathlib.Path(__file__).resolve().parent CONFIG_DIR = BASE_DIR / "fakes/configs" def test_example() -> None: config = parse(CONFIG_DIR / "example.toml") assert config is not
None
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_cli_config.py
test_example
assert
complex_expr
13
import pathlib from pysen.cli_config import parse BASE_DIR = pathlib.Path(__file__).resolve().parent CONFIG_DIR = BASE_DIR / "fakes/configs" def test_example() -> None: config = parse(CONFIG_DIR / "example.toml") assert config is not None assert config.settings_dir is not None assert config.settings...
CONFIG_DIR / "hoge"
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_command.py
test_check_command_installed
assert
numeric_literal
24
import pathlib import subprocess import tempfile import unittest.mock from typing import Iterator, List import pytest from pysen.command import check_command_installed from pysen.exceptions import CommandNotFoundError def invalid_command() -> Iterator[List[str]]: with tempfile.TemporaryDirectory() as td: ...
127
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_command.py
test_check_command_installed
pytest.raises
variable
20
import pathlib import subprocess import tempfile import unittest.mock from typing import Iterator, List import pytest from pysen.command import check_command_installed from pysen.exceptions import CommandNotFoundError def invalid_command() -> Iterator[List[str]]: with tempfile.TemporaryDirectory() as td: ...
CommandNotFoundError)
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_diagnostic.py
test_diagnostic_post_init
pytest.raises
variable
12
from pathlib import Path import pytest from pysen.diagnostic import Diagnostic, FLCMFormatter, _format_diagnostic_position def test_diagnostic_post_init() -> None: path = Path("/path/to/file") Diagnostic(file_path=path, message="error") Diagnostic(file_path=path, diff="diff") with pytest.raises(
ValueError)
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_diagnostic.py
test__format_diagnostic_position
assert
string_literal
16
from pathlib import Path import pytest from pysen.diagnostic import Diagnostic, FLCMFormatter, _format_diagnostic_position def test__format_diagnostic_position() -> None: path = Path("/path/to/file") position = _format_diagnostic_position( Diagnostic(start_line=10, end_line=12, start_column=3, file_p...
f"{path.resolve()}:1:1"
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_diagnostic.py
test__format_diagnostic_position
assert
string_literal
13
from pathlib import Path import pytest from pysen.diagnostic import Diagnostic, FLCMFormatter, _format_diagnostic_position def test__format_diagnostic_position() -> None: path = Path("/path/to/file") position = _format_diagnostic_position( Diagnostic(start_line=10, end_line=12, start_column=3, file_p...
f"{path.resolve()}:10:3"
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_diagnostic.py
test_diagnostic_formatter
assert
string_literal
21
from pathlib import Path import pytest from pysen.diagnostic import Diagnostic, FLCMFormatter, _format_diagnostic_position def test_diagnostic_formatter() -> None: path = Path("/path/to/file") formatter = FLCMFormatter err = formatter.format( Diagnostic( start_line=10, end...
f"{path.resolve()}:10:3:my_command: line1\\nline2"
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_diagnostic.py
test_diagnostic_formatter
assert
string_literal
33
from pathlib import Path import pytest from pysen.diagnostic import Diagnostic, FLCMFormatter, _format_diagnostic_position def test_diagnostic_formatter() -> None: path = Path("/path/to/file") formatter = FLCMFormatter err = formatter.format( Diagnostic( start_line=10, end...
f"{path.resolve()}:10:3:my_command2: -line1\\n+line2\\n"
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_dumper.py
test_dump
pytest.raises
variable
35
import pathlib import re import tempfile from typing import Iterator import pytest import tomlkit from pysen import dumper from pysen.setting import SettingFile MULTIPLE_SPACES = re.compile(r"\s+") TOOL_HEADING = "[tool]\n" def normalize_spaces(s: str) -> str: return MULTIPLE_SPACES.sub(" ", s) def temp_file()...
RuntimeError)
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_dumper.py
_assert_toml
assert
func_call
27
import pathlib import re import tempfile from typing import Iterator import pytest import tomlkit from pysen import dumper from pysen.setting import SettingFile MULTIPLE_SPACES = re.compile(r"\s+") TOOL_HEADING = "[tool]\n" def normalize_spaces(s: str) -> str: return MULTIPLE_SPACES.sub(" ", s) def temp_file()...
expected.as_dict()
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_dumper.py
test_dump_toml
assert
func_call
59
import pathlib import re import tempfile from typing import Iterator import pytest import tomlkit from pysen import dumper from pysen.setting import SettingFile MULTIPLE_SPACES = re.compile(r"\s+") TOOL_HEADING = "[tool]\n" def normalize_spaces(s: str) -> str: return MULTIPLE_SPACES.sub(" ", s) def temp_file()...
normalize_spaces(expected)
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_error_lines.py
test_standard_parser
assert
numeric_literal
89
from pathlib import Path from unittest import mock from pysen.error_lines import parse_error_diffs, parse_error_lines from pysen.ext.black_wrapper import _parse_file_path std_err1 = "/path/to/file1.py:70:5: error: Missing return statement [return]\n" std_err2 = "/path/to/file2.py:71:6: error: Missing return statement...
5
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_error_lines.py
test_standard_parser
assert
numeric_literal
95
from pathlib import Path from unittest import mock from pysen.error_lines import parse_error_diffs, parse_error_lines from pysen.ext.black_wrapper import _parse_file_path std_err1 = "/path/to/file1.py:70:5: error: Missing return statement [return]\n" std_err2 = "/path/to/file2.py:71:6: error: Missing return statement...
6
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_error_lines.py
test_diff_parser
assert
numeric_literal
86
from pathlib import Path from unittest import mock from pysen.error_lines import parse_error_diffs, parse_error_lines from pysen.ext.black_wrapper import _parse_file_path std_err1 = "/path/to/file1.py:70:5: error: Missing return statement [return]\n" std_err2 = "/path/to/file2.py:71:6: error: Missing return statement...
2
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_error_lines.py
test_diff_parser
assert
numeric_literal
88
from pathlib import Path from unittest import mock from pysen.error_lines import parse_error_diffs, parse_error_lines from pysen.ext.black_wrapper import _parse_file_path std_err1 = "/path/to/file1.py:70:5: error: Missing return statement [return]\n" std_err2 = "/path/to/file2.py:71:6: error: Missing return statement...
1
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_error_lines.py
test_standard_parser
assert
numeric_literal
87
from pathlib import Path from unittest import mock from pysen.error_lines import parse_error_diffs, parse_error_lines from pysen.ext.black_wrapper import _parse_file_path std_err1 = "/path/to/file1.py:70:5: error: Missing return statement [return]\n" std_err2 = "/path/to/file2.py:71:6: error: Missing return statement...
70
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_error_lines.py
test_standard_parser
assert
numeric_literal
93
from pathlib import Path from unittest import mock from pysen.error_lines import parse_error_diffs, parse_error_lines from pysen.ext.black_wrapper import _parse_file_path std_err1 = "/path/to/file1.py:70:5: error: Missing return statement [return]\n" std_err2 = "/path/to/file2.py:71:6: error: Missing return statement...
71
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_factory.py
test_configure_lint_default_source
assert
numeric_literal
8
from pysen.black import Black from pysen.factory import ConfigureLintOptions, configure_lint from pysen.source import Source def test_configure_lint_default_source() -> None: components = configure_lint(ConfigureLintOptions(enable_black=True, source=None)) assert len(components) ==
1
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_factory.py
test_configure_lint_default_source
assert
collection
13
from pysen.black import Black from pysen.factory import ConfigureLintOptions, configure_lint from pysen.source import Source def test_configure_lint_default_source() -> None: components = configure_lint(ConfigureLintOptions(enable_black=True, source=None)) assert len(components) == 1 black = components[0] ...
{"."}
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_flake8.py
test_flake8_setting_comment
assert
numeric_literal
8
from typing import Any, Dict from pysen.ext.flake8_wrapper import Flake8Setting def test_flake8_setting_comment() -> None: flake8 = Flake8Setting().to_black_compatible() assert len(flake8._comments) >
0
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_flake8.py
test_flake8_setting_comment
assert
collection
10
from typing import Any, Dict from pysen.ext.flake8_wrapper import Flake8Setting def test_flake8_setting_comment() -> None: flake8 = Flake8Setting().to_black_compatible() assert len(flake8._comments) > 0 section_name, section = flake8.export() assert section_name ==
["flake8"]
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_git_utils.py
test_list_indexed_files
assert
collection
29
import pathlib import tempfile from typing import Sequence import git import pytest from _pytest.monkeypatch import MonkeyPatch from pysen import git_utils from pysen.git_utils import GitRepositoryNotFoundError BASE_DIR = pathlib.Path(__file__).resolve().parent def test_list_indexed_files() -> None: def list_in...
[]
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_git_utils.py
test_list_indexed_files
assert
collection
37
import pathlib import tempfile from typing import Sequence import git import pytest from _pytest.monkeypatch import MonkeyPatch from pysen import git_utils from pysen.git_utils import GitRepositoryNotFoundError BASE_DIR = pathlib.Path(__file__).resolve().parent def test_list_indexed_files() -> None: def list_in...
[test_file]
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_git_utils.py
test_list_indexed_files
assert
collection
57
import pathlib import tempfile from typing import Sequence import git import pytest from _pytest.monkeypatch import MonkeyPatch from pysen import git_utils from pysen.git_utils import GitRepositoryNotFoundError BASE_DIR = pathlib.Path(__file__).resolve().parent def test_list_indexed_files() -> None: def list_in...
{test_file2}
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_git_utils.py
test_list_indexed_files
assert
collection
58
import pathlib import tempfile from typing import Sequence import git import pytest from _pytest.monkeypatch import MonkeyPatch from pysen import git_utils from pysen.git_utils import GitRepositoryNotFoundError BASE_DIR = pathlib.Path(__file__).resolve().parent def test_list_indexed_files() -> None: def list_in...
{test_file3}
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_git_utils.py
test_check_tracked
pytest.raises
variable
22
import pathlib import tempfile from typing import Sequence import git import pytest from _pytest.monkeypatch import MonkeyPatch from pysen import git_utils from pysen.git_utils import GitRepositoryNotFoundError BASE_DIR = pathlib.Path(__file__).resolve().parent def test_check_tracked() -> None: with tempfile.Te...
GitRepositoryNotFoundError)
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_init.py
test_load_manifest
assert
none_literal
21
import argparse import pathlib import tempfile import unittest.mock from typing import Optional, Sequence import pytest import pysen from pysen import ConfigureLintOptions, configure_lint from pysen.exceptions import CommandNotFoundError from pysen.manifest import Manifest, TargetType from pysen.reporter import Repor...
None
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_init.py
test_run
pytest.raises
variable
62
import argparse import pathlib import tempfile import unittest.mock from typing import Optional, Sequence import pytest import pysen from pysen import ConfigureLintOptions, configure_lint from pysen.exceptions import CommandNotFoundError from pysen.manifest import Manifest, TargetType from pysen.reporter import Repor...
ValueError)
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_init.py
test_load_manifest
pytest.raises
variable
23
import argparse import pathlib import tempfile import unittest.mock from typing import Optional, Sequence import pytest import pysen from pysen import ConfigureLintOptions, configure_lint from pysen.exceptions import CommandNotFoundError from pysen.manifest import Manifest, TargetType from pysen.reporter import Repor...
FileNotFoundError)
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_init.py
test_run
pytest.raises
variable
42
import argparse import pathlib import tempfile import unittest.mock from typing import Optional, Sequence import pytest import pysen from pysen import ConfigureLintOptions, configure_lint from pysen.exceptions import CommandNotFoundError from pysen.manifest import Manifest, TargetType from pysen.reporter import Repor...
CommandNotFoundError)
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_isort.py
test_to_black_compatible
assert
numeric_literal
36
from importlib.metadata import PackageNotFoundError from pathlib import Path from unittest import mock import pytest from pysen.exceptions import ( DistributionNotFound, IncompatibleVersionError, UnexpectedErrorFormat, ) from pysen.ext.isort_wrapper import ( IsortSectionName, IsortSetting, _ch...
3
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_isort.py
test_to_black_compatible
assert
numeric_literal
38
from importlib.metadata import PackageNotFoundError from pathlib import Path from unittest import mock import pytest from pysen.exceptions import ( DistributionNotFound, IncompatibleVersionError, UnexpectedErrorFormat, ) from pysen.ext.isort_wrapper import ( IsortSectionName, IsortSetting, _ch...
0
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_isort.py
test__get_isort_version
assert
func_call
37
from importlib.metadata import PackageNotFoundError from pathlib import Path from unittest import mock import pytest from pysen.exceptions import ( DistributionNotFound, IncompatibleVersionError, UnexpectedErrorFormat, ) from pysen.ext.isort_wrapper import ( IsortSectionName, IsortSetting, _ch...
str(e)
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_isort.py
test_export
assert
collection
32
from importlib.metadata import PackageNotFoundError from pathlib import Path from unittest import mock import pytest from pysen.exceptions import ( DistributionNotFound, IncompatibleVersionError, UnexpectedErrorFormat, ) from pysen.ext.isort_wrapper import ( IsortSectionName, IsortSetting, _ch...
["tool", "isort"]
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_isort.py
test__get_isort_version
pytest.raises
variable
39
from importlib.metadata import PackageNotFoundError from pathlib import Path from unittest import mock import pytest from pysen.exceptions import ( DistributionNotFound, IncompatibleVersionError, UnexpectedErrorFormat, ) from pysen.ext.isort_wrapper import ( IsortSectionName, IsortSetting, _ch...
DistributionNotFound)
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_isort.py
test__parse_file_path
pytest.raises
variable
37
from importlib.metadata import PackageNotFoundError from pathlib import Path from unittest import mock import pytest from pysen.exceptions import ( DistributionNotFound, IncompatibleVersionError, UnexpectedErrorFormat, ) from pysen.ext.isort_wrapper import ( IsortSectionName, IsortSetting, _ch...
UnexpectedErrorFormat)
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_isort.py
test__get_isort_version
pytest.raises
variable
34
from importlib.metadata import PackageNotFoundError from pathlib import Path from unittest import mock import pytest from pysen.exceptions import ( DistributionNotFound, IncompatibleVersionError, UnexpectedErrorFormat, ) from pysen.ext.isort_wrapper import ( IsortSectionName, IsortSetting, _ch...
IncompatibleVersionError)
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_isort.py
test__get_isort_version
assert
func_call
32
from importlib.metadata import PackageNotFoundError from pathlib import Path from unittest import mock import pytest from pysen.exceptions import ( DistributionNotFound, IncompatibleVersionError, UnexpectedErrorFormat, ) from pysen.ext.isort_wrapper import ( IsortSectionName, IsortSetting, _ch...
VersionRepresentation(5, 1, 2)
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_isort.py
test__parse_file_path
assert
func_call
36
from importlib.metadata import PackageNotFoundError from pathlib import Path from unittest import mock import pytest from pysen.exceptions import ( DistributionNotFound, IncompatibleVersionError, UnexpectedErrorFormat, ) from pysen.ext.isort_wrapper import ( IsortSectionName, IsortSetting, _ch...
Path("/path/to/error_line_parser.py")
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_isort.py
test__parse_file_path
assert
func_call
33
from importlib.metadata import PackageNotFoundError from pathlib import Path from unittest import mock import pytest from pysen.exceptions import ( DistributionNotFound, IncompatibleVersionError, UnexpectedErrorFormat, ) from pysen.ext.isort_wrapper import ( IsortSectionName, IsortSetting, _ch...
Path( "/path/to/error_line_parser.py" )
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_isort.py
test_export
assert
collection
34
from importlib.metadata import PackageNotFoundError from pathlib import Path from unittest import mock import pytest from pysen.exceptions import ( DistributionNotFound, IncompatibleVersionError, UnexpectedErrorFormat, ) from pysen.ext.isort_wrapper import ( IsortSectionName, IsortSetting, _ch...
{ "known_third_party": ["alpha", "beta"], "default_section": "THIRDPARTY", "sections": ["FUTURE", "STDLIB"], "line_length": 80, "force_single_line": True, # NOTE(igarashi): the following values are emitted by default "force_grid_wrap": 0, "include_trailing_comma": True, "multi_line_output": 3, "use_parentheses": True, ...
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_lint_command.py
test_single_file_lint_command_base
assert
numeric_literal
31
import logging import pathlib from tempfile import TemporaryDirectory from typing import List, Optional, Set from unittest import mock from pysen.diagnostic import Diagnostic from pysen.lint_command import ( LintCommandBase, SingleFileFormatCommandBase, SingleFileLintCommandBase, ) from pysen.reporter impo...
0
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_lint_command.py
test_single_file_lint_command_base
assert
numeric_literal
32
import logging import pathlib from tempfile import TemporaryDirectory from typing import List, Optional, Set from unittest import mock from pysen.diagnostic import Diagnostic from pysen.lint_command import ( LintCommandBase, SingleFileFormatCommandBase, SingleFileLintCommandBase, ) from pysen.reporter impo...
2
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_lint_command.py
test_single_file_lint_command_base
assert
numeric_literal
41
import logging import pathlib from tempfile import TemporaryDirectory from typing import List, Optional, Set from unittest import mock from pysen.diagnostic import Diagnostic from pysen.lint_command import ( LintCommandBase, SingleFileFormatCommandBase, SingleFileLintCommandBase, ) from pysen.reporter impo...
1
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_lint_command.py
resolve_files
assert
none_literal
27
import logging import pathlib from tempfile import TemporaryDirectory from typing import List, Optional, Set from unittest import mock from pysen.diagnostic import Diagnostic from pysen.lint_command import ( LintCommandBase, SingleFileFormatCommandBase, SingleFileLintCommandBase, ) from pysen.reporter impo...
None
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_lint_command.py
test_lint_command_base
assert
string_literal
23
import logging import pathlib from tempfile import TemporaryDirectory from typing import List, Optional, Set from unittest import mock from pysen.diagnostic import Diagnostic from pysen.lint_command import ( LintCommandBase, SingleFileFormatCommandBase, SingleFileLintCommandBase, ) from pysen.reporter impo...
"fake"
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_lint_command.py
test_lint_command_base
assert
variable
25
import logging import pathlib from tempfile import TemporaryDirectory from typing import List, Optional, Set from unittest import mock from pysen.diagnostic import Diagnostic from pysen.lint_command import ( LintCommandBase, SingleFileFormatCommandBase, SingleFileLintCommandBase, ) from pysen.reporter impo...
source
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_lint_command.py
test_lint_command_base
assert
variable
24
import logging import pathlib from tempfile import TemporaryDirectory from typing import List, Optional, Set from unittest import mock from pysen.diagnostic import Diagnostic from pysen.lint_command import ( LintCommandBase, SingleFileFormatCommandBase, SingleFileLintCommandBase, ) from pysen.reporter impo...
BASE_DIR
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_logging_utils.py
test_setup_finalize
assert
numeric_literal
45
import dataclasses import logging from typing import Iterator, List, Tuple from unittest import mock import colorlog import pytest from pysen import logging_utils SetupLoggerArgsType = Tuple[logging.Logger, int, logging.Handler] def mock_setup_logger() -> Iterator[List[SetupLoggerArgsType]]: args: List[SetupLog...
1
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_logging_utils.py
test_setup_finalize
assert
numeric_literal
60
import dataclasses import logging from typing import Iterator, List, Tuple from unittest import mock import colorlog import pytest from pysen import logging_utils SetupLoggerArgsType = Tuple[logging.Logger, int, logging.Handler] def mock_setup_logger() -> Iterator[List[SetupLoggerArgsType]]: args: List[SetupLog...
2
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_logging_utils.py
test_setup_finalize
assert
numeric_literal
64
import dataclasses import logging from typing import Iterator, List, Tuple from unittest import mock import colorlog import pytest from pysen import logging_utils SetupLoggerArgsType = Tuple[logging.Logger, int, logging.Handler] def mock_setup_logger() -> Iterator[List[SetupLoggerArgsType]]: args: List[SetupLog...
0
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_logging_utils.py
test_setup
assert
none_literal
53
import dataclasses import logging from typing import Iterator, List, Tuple from unittest import mock import colorlog import pytest from pysen import logging_utils SetupLoggerArgsType = Tuple[logging.Logger, int, logging.Handler] def mock_setup_logger() -> Iterator[List[SetupLoggerArgsType]]: args: List[SetupLog...
None
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_logging_utils.py
test_grouped_memory_handler
assert
variable
45
import dataclasses import logging from typing import Iterator, List, Tuple from unittest import mock import colorlog import pytest from pysen import logging_utils SetupLoggerArgsType = Tuple[logging.Logger, int, logging.Handler] def mock_setup_logger() -> Iterator[List[SetupLoggerArgsType]]: args: List[SetupLog...
formatter
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_logging_utils.py
test_setup
assert
string_literal
54
import dataclasses import logging from typing import Iterator, List, Tuple from unittest import mock import colorlog import pytest from pysen import logging_utils SetupLoggerArgsType = Tuple[logging.Logger, int, logging.Handler] def mock_setup_logger() -> Iterator[List[SetupLoggerArgsType]]: args: List[SetupLog...
"%(message)s"
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_logging_utils.py
test__get_process_output_level_name
assert
complex_expr
24
import dataclasses import logging from typing import Iterator, List, Tuple from unittest import mock import colorlog import pytest from pysen import logging_utils SetupLoggerArgsType = Tuple[logging.Logger, int, logging.Handler] def mock_setup_logger() -> Iterator[List[SetupLoggerArgsType]]: args: List[SetupLog...
logging_utils._PROCESS_STDOUT
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_logging_utils.py
test__get_process_output_level_name
assert
complex_expr
28
import dataclasses import logging from typing import Iterator, List, Tuple from unittest import mock import colorlog import pytest from pysen import logging_utils SetupLoggerArgsType = Tuple[logging.Logger, int, logging.Handler] def mock_setup_logger() -> Iterator[List[SetupLoggerArgsType]]: args: List[SetupLog...
logging_utils._PROCESS_STDERR
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_logging_utils.py
test_setup
assert
complex_expr
46
import dataclasses import logging from typing import Iterator, List, Tuple from unittest import mock import colorlog import pytest from pysen import logging_utils SetupLoggerArgsType = Tuple[logging.Logger, int, logging.Handler] def mock_setup_logger() -> Iterator[List[SetupLoggerArgsType]]: args: List[SetupLog...
logging_utils._logging_output_colors
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_logging_utils.py
test_grouped_memory_handler
assert
collection
41
import dataclasses import logging from typing import Iterator, List, Tuple from unittest import mock import colorlog import pytest from pysen import logging_utils SetupLoggerArgsType = Tuple[logging.Logger, int, logging.Handler] def mock_setup_logger() -> Iterator[List[SetupLoggerArgsType]]: args: List[SetupLog...
["black1", "black2", "isort1", "isort2", "one", "two"]
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_manifest.py
test_export_settings
assert
numeric_literal
57
import argparse import pathlib from typing import Any, Callable, Dict, List, Optional, Sequence import pytest from fakes.component import FakeComponent, Operation from pysen import dumper from pysen.component import ComponentBase from pysen.exceptions import InvalidComponentName from pysen.manifest import Manifest, e...
3
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_manifest.py
test_get_target
assert
numeric_literal
52
import argparse import pathlib from typing import Any, Callable, Dict, List, Optional, Sequence import pytest from fakes.component import FakeComponent, Operation from pysen import dumper from pysen.component import ComponentBase from pysen.exceptions import InvalidComponentName from pysen.manifest import Manifest, e...
2
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_manifest.py
test_get_target
assert
numeric_literal
69
import argparse import pathlib from typing import Any, Callable, Dict, List, Optional, Sequence import pytest from fakes.component import FakeComponent, Operation from pysen import dumper from pysen.component import ComponentBase from pysen.exceptions import InvalidComponentName from pysen.manifest import Manifest, e...
1
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_manifest.py
test_export_settings
assert
variable
63
import argparse import pathlib from typing import Any, Callable, Dict, List, Optional, Sequence import pytest from fakes.component import FakeComponent, Operation from pysen import dumper from pysen.component import ComponentBase from pysen.exceptions import InvalidComponentName from pysen.manifest import Manifest, e...
dumped
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_manifest.py
test_get_targets
assert
func_call
62
import argparse import pathlib from typing import Any, Callable, Dict, List, Optional, Sequence import pytest from fakes.component import FakeComponent, Operation from pysen import dumper from pysen.component import ComponentBase from pysen.exceptions import InvalidComponentName from pysen.manifest import Manifest, e...
str(e)
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_manifest.py
test_default_dump_handler
assert
complex_expr
46
import argparse import pathlib from typing import Any, Callable, Dict, List, Optional, Sequence import pytest from fakes.component import FakeComponent, Operation from pysen import dumper from pysen.component import ComponentBase from pysen.exceptions import InvalidComponentName from pysen.manifest import Manifest, e...
dumper.dump
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_manifest.py
dump
assert
variable
45
import argparse import pathlib from typing import Any, Callable, Dict, List, Optional, Sequence import pytest from fakes.component import FakeComponent, Operation from pysen import dumper from pysen.component import ComponentBase from pysen.exceptions import InvalidComponentName from pysen.manifest import Manifest, e...
settings_dir
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor
pfnet/pysen
f9694670924687b864384c87858ec70dc3fb6402
10
train
train
tests/test_manifest.py
test_components
assert
func_call
47
import argparse import pathlib from typing import Any, Callable, Dict, List, Optional, Sequence import pytest from fakes.component import FakeComponent, Operation from pysen import dumper from pysen.component import ComponentBase from pysen.exceptions import InvalidComponentName from pysen.manifest import Manifest, e...
list(components)
f9694670924687b864384c87858ec70dc3fb6402
10
v2_extractor_at_anchor