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
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_ifconfig_device_not_found.py
test_get_new_comman
assert
variable
33
import pytest from six import BytesIO from thefuck.rules.ifconfig_device_not_found import match, get_new_command from thefuck.types import Command output = '{}: error fetching interface information: Device not found' stdout = b''' wlp2s0 Link encap:Ethernet HWaddr 5c:51:4f:7c:58:5d inet addr:192.168.0.1...
result
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_ln_no_hard_link.py
test_get_new_command
assert
variable
17
import pytest from thefuck.rules.ln_no_hard_link import match, get_new_command from thefuck.types import Command error = "hard link not allowed for directory" @pytest.mark.parametrize('script, result', [ ("ln barDir barLink", "ln -s barDir barLink"), ("sudo ln barDir barLink", "sudo ln -s barDir barLink"), ...
result
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_ln_s_order.py
test_match
assert
variable
17
import pytest from thefuck.rules.ln_s_order import match, get_new_command from thefuck.types import Command def file_exists(mocker): return mocker.patch('os.path.exists', return_value=True) @pytest.mark.usefixtures('file_exists') @pytest.mark.parametrize('script, result', [ ('ln -s dest source', 'ln -s source...
result
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_missing_space_before_subcommand.py
test_get_new_command
assert
variable
17
import pytest from thefuck.rules.missing_space_before_subcommand import ( match, get_new_command) from thefuck.types import Command def all_executables(mocker): return mocker.patch( 'thefuck.rules.missing_space_before_subcommand.get_all_executables', return_value=['git', 'ls', 'npm']) @pytest....
result
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_no_command.py
test_get_new_command
assert
variable
21
import pytest from thefuck.rules.no_command import match, get_new_command from thefuck.types import Command def get_all_executables(mocker): mocker.patch('thefuck.rules.no_command.get_all_executables', return_value=['vim', 'fsck', 'git', 'go']) def history_without_current(mocker): return mock...
result
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_npm_missing_script.py
test_get_new_command
assert
variable
51
import pytest from io import BytesIO from thefuck.types import Command from thefuck.rules.npm_missing_script import match, get_new_command output = ''' npm ERR! Linux 4.4.0-31-generic npm ERR! argv "/opt/node/bin/node" "/opt/node/bin/npm" "run" "dvelop" npm ERR! node v4.4.7 npm ERR! npm v2.15.8 npm ERR! missing scri...
result
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_npm_run_script.py
test_get_new_command
assert
variable
63
import pytest from io import BytesIO from thefuck.rules.npm_run_script import match, get_new_command from thefuck.types import Command output = ''' Usage: npm <command> where <command> is one of: access, add-user, adduser, apihelp, author, bin, bugs, c, cache, completion, config, ddp, dedupe, deprecate, dist-...
result
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_npm_wrong_command.py
test_get_new_command
assert
variable
40
import pytest from thefuck.rules.npm_wrong_command import match, get_new_command from thefuck.types import Command output = ''' Usage: npm <command> where <command> is one of: access, add-user, adduser, apihelp, author, bin, bugs, c, cache, completion, config, ddp, dedupe, deprecate, dist-tag, dist-tags, ...
result
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_path_from_history.py
test_get_new_command
assert
variable
23
import pytest from thefuck.rules.path_from_history import match, get_new_command from thefuck.types import Command def history(mocker): return mocker.patch( 'thefuck.rules.path_from_history.get_valid_history_without_current', return_value=['cd /opt/java', 'ls ~/work/project/']) def path_exists(moc...
result
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_react_native_command_unrecognized.py
test_get_new_command
assert
variable
49
import pytest from io import BytesIO from thefuck.rules.react_native_command_unrecognized import match, \ get_new_command from thefuck.types import Command output = "Unrecognized command '{}'".format stdout = b''' Scanning 615 folders for symlinks in /home/nvbn/work/zcho/BookkaWebView/node_modules (6ms) Usage:...
result
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_scm_correction.py
test_get_new_command
assert
variable
16
import pytest from thefuck.rules.scm_correction import match, get_new_command from thefuck.types import Command def get_actual_scm_mock(mocker): return mocker.patch('thefuck.rules.scm_correction._get_actual_scm', return_value=None) @pytest.mark.parametrize('script, actual_scm, result', [ ...
result
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_sudo_command_from_user_path.py
test_get_new_command
assert
variable
20
import pytest from thefuck.rules.sudo_command_from_user_path import match, get_new_command from thefuck.types import Command output = 'sudo: {}: command not found' def which(mocker): return mocker.patch('thefuck.rules.sudo_command_from_user_path.which', return_value='/usr/bin/app') @pytes...
result
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_workon_doesnt_exists.py
test_get_new_command
assert
variable
16
import pytest from thefuck.rules.workon_doesnt_exists import match, get_new_command from thefuck.types import Command def envs(mocker): return mocker.patch( 'thefuck.rules.workon_doesnt_exists._get_all_environments', return_value=['thefuck', 'code_view']) @pytest.mark.parametrize('script, result',...
result
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_yarn_command_not_found.py
test_get_new_command
assert
variable
101
from io import BytesIO import pytest from thefuck.types import Command from thefuck.rules.yarn_command_not_found import match, get_new_command output = ''' error Command "{}" not found. '''.format yarn_help_stdout = b''' Usage: yarn [command] [flags] Options: -h, --help output usage in...
result
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/specific/test_git.py
test_git_support_match
assert
variable
19
import pytest from thefuck.specific.git import git_support from thefuck.types import Command @pytest.mark.parametrize('command, is_git', [ ('git pull', True), ('hub pull', True), ('git push --set-upstream origin foo', True), ('hub push --set-upstream origin foo', True), ('ls', False), ('cat git...
is_git
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/specific/test_sudo.py
test_sudo_support
assert
variable
19
import pytest from thefuck.specific.sudo import sudo_support from thefuck.types import Command @pytest.mark.parametrize('return_value, command, called, result', [ ('ls -lah', 'sudo ls', 'ls', 'sudo ls -lah'), ('ls -lah', 'ls', 'ls', 'ls -lah'), (['ls -lah'], 'sudo ls', 'ls', ['sudo ls -lah']), (True, '...
result
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_argument_parser.py
test_parse
assert
variable
35
import pytest from thefuck.argument_parser import Parser from thefuck.const import ARGUMENT_PLACEHOLDER def _args(**override): args = {'alias': None, 'command': [], 'yes': False, 'help': False, 'version': False, 'debug': False, 'force_command': None, 'repeat': False, 'enable_exp...
result
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_readme.py
test_readme
assert
variable
12
def test_readme(source_root): with source_root.joinpath('README.md').open() as f: readme = f.read() bundled = source_root.joinpath('thefuck') \ .joinpath('rules') \ .glob('*.py') for rule in bundled: if rule.stem != '__i...
readme
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_types.py
test_from_script
assert
variable
31
import os from subprocess import PIPE, STDOUT from mock import Mock import pytest from tests.utils import CorrectedCommand, Rule from thefuck import const from thefuck.exceptions import EmptyCommand from thefuck.system import Path from thefuck.types import Command class TestCommand(object): def Popen(self, monkey...
result
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_utils.py
test_replace_argument
assert
variable
19
import pytest import warnings from mock import Mock, patch from thefuck.utils import default_settings, \ memoize, get_closest, get_all_executables, replace_argument, \ get_all_matched_commands, is_app, for_app, cache, \ get_valid_history_without_current, _cache, get_close_matches from thefuck.types import C...
result
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_ag_literal.py
test_get_new_command
assert
variable
13
import pytest from thefuck.rules.ag_literal import get_new_command, match from thefuck.types import Command def output(): return ('ERR: Bad regex! pcre_compile() failed at position 1: missing )\n' 'If you meant to search for a literal string, run ag with -Q\n') @pytest.mark.parametrize('script, new_cm...
new_cmd
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_git_bisect_usage.py
test_get_new_command
assert
variable
16
import pytest from thefuck.types import Command from thefuck.rules.git_bisect_usage import match, get_new_command def output(): return ("usage: git bisect [help|start|bad|good|new|old" "|terms|skip|next|reset|visualize|replay|log|run]") @pytest.mark.parametrize('script, new_cmd, ', [ ('git bisect ...
new_cmd
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/specific/test_git.py
test_git_support
assert
variable
15
import pytest from thefuck.specific.git import git_support from thefuck.types import Command @pytest.mark.parametrize('called, command, output', [ ('git co', 'git checkout', "19:22:36.299340 git.c:282 trace: alias expansion: co => 'checkout'"), ('git com file', 'git commit --verbose file', "19:23:25.470...
command
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_types.py
test_run
assert
variable
26
import os from subprocess import PIPE, STDOUT from mock import Mock import pytest from tests.utils import CorrectedCommand, Rule from thefuck import const from thefuck.exceptions import EmptyCommand from thefuck.system import Path from thefuck.types import Command class TestCorrectedCommand(object): @pytest.mark....
printed
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_ssh_known_host.py
test_side_effect
assert
variable
48
import os import pytest from thefuck.rules.ssh_known_hosts import match, get_new_command,\ side_effect from thefuck.types import Command def ssh_error(tmpdir): path = os.path.join(str(tmpdir), 'known_hosts') def reset(path): with open(path, 'w') as fh: lines = [ '123.23...
expected
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_apt_invalid_operation.py
test_get_operations
assert
variable
94
from io import BytesIO import pytest from thefuck.types import Command from thefuck.rules.apt_invalid_operation import match, get_new_command, \ _get_operations invalid_operation = 'E: Invalid operation {}'.format apt_help = b'''apt 1.0.10.2ubuntu1 for amd64 compiled on Oct 5 2015 15:55:05 Usage: apt [options] co...
operations
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_types.py
test_from_path
assert_*
variable
26
import os from subprocess import PIPE, STDOUT from mock import Mock import pytest from tests.utils import CorrectedCommand, Rule from thefuck import const from thefuck.exceptions import EmptyCommand from thefuck.system import Path from thefuck.types import Command class TestRule(object): def test_from_path(self, m...
rule_path)
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_types.py
test_is_enabled
assert
variable
28
import os from subprocess import PIPE, STDOUT from mock import Mock import pytest from tests.utils import CorrectedCommand, Rule from thefuck import const from thefuck.exceptions import EmptyCommand from thefuck.system import Path from thefuck.types import Command class TestRule(object): @pytest.mark.parametrize(...
is_enabled
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_adb_unknown_command.py
test_get_new_command
assert
variable
25
import pytest from thefuck.rules.adb_unknown_command import match, get_new_command from thefuck.types import Command def output(): return '''Android Debug Bridge version 1.0.31 -d - directs command to the only connected USB device returns an error if mo...
new_command
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_apt_get.py
test_get_new_command
assert
variable
21
import pytest from thefuck.rules.apt_get import match, get_new_command from thefuck.types import Command @pytest.mark.parametrize('command, new_command, packages', [ (Command('vim', ''), 'sudo apt-get install vim && vim', [('vim', 'main'), ('vim-tiny', 'main')]), (Command('convert', ''), 'sudo apt-get ins...
new_command
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_brew_link.py
test_get_new_command
assert
variable
23
import pytest from thefuck.types import Command from thefuck.rules.brew_link import get_new_command, match def output(): return ("Error: Could not symlink bin/gcp\n" "Target /usr/local/bin/gcp\n" "already exists. You may want to remove it:\n" " rm '/usr/local/bin/gcp'\n" ...
new_command
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_brew_reinstall.py
test_get_new_command
assert
variable
15
import pytest from thefuck.types import Command from thefuck.rules.brew_reinstall import get_new_command, match output = ("Warning: thefuck 9.9 is already installed and up-to-date\nTo " "reinstall 9.9, run `brew reinstall thefuck`") @pytest.mark.parametrize('script, formula, ', [ ('brew install foo', 'f...
new_command
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_brew_uninstall.py
test_get_new_command
assert
variable
16
import pytest from thefuck.types import Command from thefuck.rules.brew_uninstall import get_new_command, match def output(): return ("Uninstalling /usr/local/Cellar/tbb/4.4-20160916... (118 files, 1.9M)\n" "tbb 4.4-20160526, 4.4-20160722 are still installed.\n" "Remove all versions with `b...
new_command
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_brew_update_formula.py
test_get_new_command
assert
variable
15
import pytest from thefuck.types import Command from thefuck.rules.brew_update_formula import get_new_command, match output = ("Error: This command updates brew itself, and does not take formula" " names.\nUse 'brew upgrade thefuck'.") @pytest.mark.parametrize('script, formula, ', [ ('brew update foo', ...
new_command
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_cargo_no_command.py
test_get_new_command
assert
variable
20
import pytest from thefuck.rules.cargo_no_command import match, get_new_command from thefuck.types import Command no_such_subcommand_old = """No such subcommand Did you mean `build`? """ no_such_subcommand = """error: no such subcommand \tDid you mean `build`? """ @pytest.mark.parametrize('command, new_com...
new_command
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_cat_dir.py
test_get_new_command
assert
variable
17
import pytest from thefuck.rules.cat_dir import match, get_new_command from thefuck.types import Command def isdir(mocker): return mocker.patch('thefuck.rules.cat_dir' '.os.path.isdir') @pytest.mark.parametrize('command, new_command', [ (Command('cat foo', 'cat: foo: Is a directory\n')...
new_command
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_cd_mkdir.py
test_get_new_command
assert
variable
10
import pytest from thefuck.rules.cd_mkdir import match, get_new_command from thefuck.types import Command @pytest.mark.parametrize('command, new_command', [ (Command('cd foo', ''), 'mkdir -p foo && cd foo'), (Command('cd foo/bar/baz', ''), 'mkdir -p foo/bar/baz && cd foo/bar/baz')]) def test_get_new_command(co...
new_command
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_dry.py
test_get_new_command
assert
variable
10
import pytest from thefuck.rules.dry import match, get_new_command from thefuck.types import Command @pytest.mark.parametrize('command, new_command', [ (Command('cd cd foo', ''), 'cd foo'), (Command('git git push origin/master', ''), 'git push origin/master')]) def test_get_new_command(command, new_command): ...
new_command
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_git_add.py
test_get_new_command
assert
variable
20
import pytest from thefuck.rules.git_add import match, get_new_command from thefuck.types import Command def path_exists(mocker): return mocker.patch('thefuck.rules.git_add.Path.exists', return_value=True) def output(target): return ("error: pathspec '{}' did not match any " ...
new_command
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_git_branch_exists.py
test_get_new_command
assert
variable
21
import pytest from thefuck.rules.git_branch_exists import match, get_new_command from thefuck.types import Command def output(src_branch_name): return "fatal: A branch named '{}' already exists.".format(src_branch_name) def new_command(branch_name): return [cmd.format(branch_name) for cmd in [ 'git br...
new_command
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_git_checkout.py
test_get_branches
assert
variable
29
import pytest from io import BytesIO from thefuck.rules.git_checkout import match, get_branches, get_new_command from thefuck.types import Command def did_not_match(target, did_you_forget=False): error = ("error: pathspec '{}' did not match any " "file(s) known to git.".format(target)) if did_you_...
branch_list
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_git_checkout.py
test_get_new_command
assert
variable
36
import pytest from io import BytesIO from thefuck.rules.git_checkout import match, get_branches, get_new_command from thefuck.types import Command def did_not_match(target, did_you_forget=False): error = ("error: pathspec '{}' did not match any " "file(s) known to git.".format(target)) if did_you_...
new_command
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_git_diff_no_index.py
test_get_new_command
assert
variable
9
import pytest from thefuck.rules.git_diff_no_index import match, get_new_command from thefuck.types import Command @pytest.mark.parametrize('command, new_command', [ (Command('git diff foo bar', ''), 'git diff --no-index foo bar')]) def test_get_new_command(command, new_command): assert get_new_command(comman...
new_command
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_git_diff_staged.py
test_get_new_command
assert
variable
10
import pytest from thefuck.rules.git_diff_staged import match, get_new_command from thefuck.types import Command @pytest.mark.parametrize('command, new_command', [ (Command('git diff', ''), 'git diff --staged'), (Command('git diff foo', ''), 'git diff --staged foo')]) def test_get_new_command(command, new_comm...
new_command
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/functional/test_performance.py
test_performance
assert
none_literal
44
import pytest import time dockerfile = u''' FROM python:3 RUN adduser --disabled-password --gecos '' test ENV SEED "{seed}" WORKDIR /src USER test RUN echo 'eval $(thefuck --alias)' > /home/test/.bashrc RUN echo > /home/test/.bash_history RUN git config --global user.email "you@example.com" RUN git config --global use...
None
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/output_readers/test_rerun.py
test_get_output
assert
none_literal
20
from mock import Mock, patch from psutil import AccessDenied, TimeoutExpired from thefuck.output_readers import rerun class TestRerun(object): def setup_method(self, test_method): self.patcher = patch('thefuck.output_readers.rerun.Process') process_mock = self.patcher.start() self.proc_moc...
None
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/shells/test_generic.py
test_how_to_configure
assert
none_literal
11
import pytest from thefuck.shells import Generic class TestGeneric(object): def shell(self): return Generic() def test_how_to_configure(self, shell): assert shell.how_to_configure() is
None
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/output_readers/test_rerun.py
test_wait_output_timeout_children
assert
numeric_literal
21
from mock import Mock, patch from psutil import AccessDenied, TimeoutExpired from thefuck.output_readers import rerun class TestRerun(object): def setup_method(self, test_method): self.patcher = patch('thefuck.output_readers.rerun.Process') process_mock = self.patcher.start() self.proc_moc...
3
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_conf.py
test_ignore_if_exists
assert
numeric_literal
16
import pytest import six import os from mock import Mock from thefuck import const def load_source(mocker): return mocker.patch('thefuck.conf.load_source') class TestInitializeSettingsFile(object): def test_ignore_if_exists(self, settings): settings_path_mock = Mock(is_file=Mock(return_value=True), op...
1
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_ui.py
test_command_selector
assert
numeric_literal
17
import pytest from itertools import islice from thefuck import ui from thefuck.types import CorrectedCommand from thefuck import const def patch_get_key(monkeypatch): def patch(vals): vals = iter(vals) monkeypatch.setattr('thefuck.ui.get_key', lambda: next(vals)) return patch def test_command...
1
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_ui.py
test_command_selector
assert
numeric_literal
19
import pytest from itertools import islice from thefuck import ui from thefuck.types import CorrectedCommand from thefuck import const def patch_get_key(monkeypatch): def patch(vals): vals = iter(vals) monkeypatch.setattr('thefuck.ui.get_key', lambda: next(vals)) return patch def test_command...
2
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_ui.py
test_command_selector
assert
numeric_literal
21
import pytest from itertools import islice from thefuck import ui from thefuck.types import CorrectedCommand from thefuck import const def patch_get_key(monkeypatch): def patch(vals): vals = iter(vals) monkeypatch.setattr('thefuck.ui.get_key', lambda: next(vals)) return patch def test_command...
3
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_utils.py
test_no_memoize
assert
numeric_literal
17
import pytest import warnings from mock import Mock, patch from thefuck.utils import default_settings, \ memoize, get_closest, get_all_executables, replace_argument, \ get_all_matched_commands, is_app, for_app, cache, \ get_valid_history_without_current, _cache, get_close_matches from thefuck.types import C...
2
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_utils.py
test_call_with_n
assert
numeric_literal
15
import pytest import warnings from mock import Mock, patch from thefuck.utils import default_settings, \ memoize, get_closest, get_all_executables, replace_argument, \ get_all_matched_commands, is_app, for_app, cache, \ get_valid_history_without_current, _cache, get_close_matches from thefuck.types import C...
1
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_ui.py
test_without_confirmation
assert
complex_expr
27
import pytest from itertools import islice from thefuck import ui from thefuck.types import CorrectedCommand from thefuck import const def patch_get_key(monkeypatch): def patch(vals): vals = iter(vals) monkeypatch.setattr('thefuck.ui.get_key', lambda: next(vals)) return patch class TestSelect...
commands[0]
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_ui.py
test_with_confirmation_select_second
assert
complex_expr
27
import pytest from itertools import islice from thefuck import ui from thefuck.types import CorrectedCommand from thefuck import const def patch_get_key(monkeypatch): def patch(vals): vals = iter(vals) monkeypatch.setattr('thefuck.ui.get_key', lambda: next(vals)) return patch class TestSelect...
commands[1]
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/output_readers/test_rerun.py
test_wait_output_timeout
assert_*
complex_expr
21
from mock import Mock, patch from psutil import AccessDenied, TimeoutExpired from thefuck.output_readers import rerun class TestRerun(object): def setup_method(self, test_method): self.patcher = patch('thefuck.output_readers.rerun.Process') process_mock = self.patcher.start() self.proc_moc...
self.proc_mock)
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_grep_recursive.py
test_get_new_command
assert
complex_expr
7
from thefuck.rules.grep_recursive import match, get_new_command from thefuck.types import Command def test_get_new_command(): assert get_new_command(Command('grep blah .', '')) == 'grep -r blah .' assert get_new_command(Command(u'grep café .', '')) == u
u'grep -r café .'
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/output_readers/test_rerun.py
test_wait_output_is_not_slow
assert_*
complex_expr
18
from mock import Mock, patch from psutil import AccessDenied, TimeoutExpired from thefuck.output_readers import rerun class TestRerun(object): def setup_method(self, test_method): self.patcher = patch('thefuck.output_readers.rerun.Process') process_mock = self.patcher.start() self.proc_moc...
settings.wait_command)
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_sed_unterminated_s.py
test_get_new_command
assert
complex_expr
14
import pytest from thefuck.rules.sed_unterminated_s import match, get_new_command from thefuck.types import Command def sed_unterminated_s(): return "sed: -e expression #1, char 9: unterminated `s' command" def test_get_new_command(sed_unterminated_s): assert (get_new_command(Command('sed -e s/foo/bar', sed_u...
r"sed -e 's/\/foo/bar/'"
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/output_readers/test_rerun.py
test_wait_output_is_slow
assert_*
complex_expr
18
from mock import Mock, patch from psutil import AccessDenied, TimeoutExpired from thefuck.output_readers import rerun class TestRerun(object): def setup_method(self, test_method): self.patcher = patch('thefuck.output_readers.rerun.Process') process_mock = self.patcher.start() self.proc_moc...
settings.wait_slow_command)
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_corrector.py
_compare_names
assert
func_call
22
import pytest from tests.utils import Rule, CorrectedCommand from thefuck import corrector, const from thefuck.system import Path from thefuck.types import Command from thefuck.corrector import get_corrected_commands, organize_commands class TestGetRules(object): def glob(self, mocker): results = {} ...
set(names)
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/rules/test_yarn_help.py
test_get_new_command
assert
func_call
50
import pytest from thefuck.rules.yarn_help import match, get_new_command from thefuck.types import Command from thefuck.system import open_command output_clean = ''' Usage: yarn [command] [flags] Options: -h, --help output usage information -V, --version output the...
open_command(url)
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/specific/test_sudo.py
fn
assert
func_call
7
import pytest from thefuck.specific.sudo import sudo_support from thefuck.types import Command def fn(command): assert command ==
Command(called, '')
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/shells/test_bash.py
test_app_alias
assert
func_call
19
import os import pytest from thefuck.shells import Bash class TestBash(object): def shell(self): return Bash() def shell_aliases(self): os.environ['TF_SHELL_ALIASES'] = ( 'alias fuck=\'eval $(thefuck $(fc -ln -1))\'\n' 'alias l=\'ls -CF\'\n' 'alias la=\'ls ...
shell.app_alias('fuck')
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/shells/test_bash.py
test_app_alias
assert
func_call
20
import os import pytest from thefuck.shells import Bash class TestBash(object): def shell(self): return Bash() def shell_aliases(self): os.environ['TF_SHELL_ALIASES'] = ( 'alias fuck=\'eval $(thefuck $(fc -ln -1))\'\n' 'alias l=\'ls -CF\'\n' 'alias la=\'ls ...
shell.app_alias('FUCK')
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/shells/test_fish.py
test_app_alias
assert
func_call
20
import pytest from thefuck.shells import Fish class TestFish(object): def shell(self): return Fish() def Popen(self, mocker): mock = mocker.patch('thefuck.shells.fish.Popen') mock.return_value.stdout.read.side_effect = [( b'cd\nfish_config\nfuck\nfunced\nfuncsave\ngrep\nhi...
shell.app_alias('fuck')
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/shells/test_fish.py
test_app_alias
assert
func_call
21
import pytest from thefuck.shells import Fish class TestFish(object): def shell(self): return Fish() def Popen(self, mocker): mock = mocker.patch('thefuck.shells.fish.Popen') mock.return_value.stdout.read.side_effect = [( b'cd\nfish_config\nfuck\nfunced\nfuncsave\ngrep\nhi...
shell.app_alias('FUCK')
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/shells/test_generic.py
test_app_alias
assert
func_call
11
import pytest from thefuck.shells import Generic class TestGeneric(object): def shell(self): return Generic() def test_app_alias(self, shell): assert 'alias fuck' in
shell.app_alias('fuck')
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/shells/test_generic.py
test_app_alias
assert
func_call
12
import pytest from thefuck.shells import Generic class TestGeneric(object): def shell(self): return Generic() def test_app_alias(self, shell): assert 'alias fuck' in shell.app_alias('fuck') assert 'alias FUCK' in
shell.app_alias('FUCK')
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/shells/test_powershell.py
test_app_alias
assert
func_call
11
import pytest from thefuck.shells import Powershell class TestPowershell(object): def shell(self): return Powershell() def test_app_alias(self, shell): assert 'function fuck' in
shell.app_alias('fuck')
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/shells/test_powershell.py
test_app_alias
assert
func_call
12
import pytest from thefuck.shells import Powershell class TestPowershell(object): def shell(self): return Powershell() def test_app_alias(self, shell): assert 'function fuck' in shell.app_alias('fuck') assert 'function FUCK' in
shell.app_alias('FUCK')
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/shells/test_tcsh.py
test_app_alias
assert
func_call
20
import pytest from thefuck.shells.tcsh import Tcsh class TestTcsh(object): def shell(self): return Tcsh() def Popen(self, mocker): mock = mocker.patch('thefuck.shells.tcsh.Popen') mock.return_value.stdout.read.return_value = ( b'fuck\teval $(thefuck $(fc -ln -1))\n' ...
shell.app_alias('fuck')
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/shells/test_tcsh.py
test_app_alias
assert
func_call
22
import pytest from thefuck.shells.tcsh import Tcsh class TestTcsh(object): def shell(self): return Tcsh() def Popen(self, mocker): mock = mocker.patch('thefuck.shells.tcsh.Popen') mock.return_value.stdout.read.return_value = ( b'fuck\teval $(thefuck $(fc -ln -1))\n' ...
shell.app_alias('FUCK')
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/shells/test_zsh.py
test_app_alias
assert
func_call
19
import os import pytest from thefuck.shells.zsh import Zsh class TestZsh(object): def shell(self): return Zsh() def shell_aliases(self): os.environ['TF_SHELL_ALIASES'] = ( 'fuck=\'eval $(thefuck $(fc -ln -1 | tail -n 1))\'\n' 'l=\'ls -CF\'\n' 'la=\'ls -A\'\...
shell.app_alias('fuck')
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/shells/test_zsh.py
test_app_alias
assert
func_call
20
import os import pytest from thefuck.shells.zsh import Zsh class TestZsh(object): def shell(self): return Zsh() def shell_aliases(self): os.environ['TF_SHELL_ALIASES'] = ( 'fuck=\'eval $(thefuck $(fc -ln -1 | tail -n 1))\'\n' 'l=\'ls -CF\'\n' 'la=\'ls -A\'\...
shell.app_alias('FUCK')
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_conf.py
test_get_user_dir_path
assert
func_call
27
import pytest import six import os from mock import Mock from thefuck import const def load_source(mocker): return mocker.patch('thefuck.conf.load_source') @pytest.mark.parametrize('legacy_dir_exists, xdg_config_home, result', [ (False, '~/.config', '~/.config/thefuck'), (False, '/user/test/config/', '/us...
os.path.expanduser(result)
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_types.py
test_equality
assert
func_call
15
import os from subprocess import PIPE, STDOUT from mock import Mock import pytest from tests.utils import CorrectedCommand, Rule from thefuck import const from thefuck.exceptions import EmptyCommand from thefuck.system import Path from thefuck.types import Command class TestCorrectedCommand(object): def test_equa...
CorrectedCommand('ls', None, 200)
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_utils.py
test_call_without_n
assert
func_call
16
import pytest import warnings from mock import Mock, patch from thefuck.utils import default_settings, \ memoize, get_closest, get_all_executables, replace_argument, \ get_all_matched_commands, is_app, for_app, cache, \ get_valid_history_without_current, _cache, get_close_matches from thefuck.types import C...
settings.get('num_close_matches')
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_conf.py
test_from_file
assert
bool_literal
22
import pytest import six import os from mock import Mock from thefuck import const def load_source(mocker): return mocker.patch('thefuck.conf.load_source') class TestSettingsFromFile(object): def test_from_file(self, load_source, settings): load_source.return_value = Mock(rules=['test'], ...
True
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
nvbn/thefuck
25142f81f83cf63c73764ec6e1f581a37af6838f
341
train
train
tests/test_conf.py
test_from_env
assert
bool_literal
27
import pytest import six import os from mock import Mock from thefuck import const def load_source(mocker): return mocker.patch('thefuck.conf.load_source') class TestSettingsFromEnv(object): def test_from_env(self, os_environ, settings): os_environ.update({'THEFUCK_RULES': 'bash:lisp', ...
False
25142f81f83cf63c73764ec6e1f581a37af6838f
341
v2_extractor_at_anchor
offu/WeRoBot
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
train
train
tests/messages/test_entries.py
test_get_value
assert
numeric_literal
11
import six from werobot.messages.entries import get_value, StringEntry, FloatEntry, IntEntry from werobot.utils import to_text def test_get_value(): instance = FakeIntance() instance.b = 6 instance.a = {'c': 'd'} assert get_value(instance, 'd', 'default') == 'default' assert get_value(instance, 'b...
6
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
v2_extractor_at_anchor
offu/WeRoBot
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
train
train
tests/messages/test_entries.py
test_int_entry
assert
numeric_literal
8
import six from werobot.messages.entries import get_value, StringEntry, FloatEntry, IntEntry from werobot.utils import to_text def test_int_entry(): assert isinstance(t.test_int, int) assert t.test_int ==
123
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
v2_extractor_at_anchor
offu/WeRoBot
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
train
train
tests/messages/test_entries.py
test_get_value
assert
string_literal
12
import six from werobot.messages.entries import get_value, StringEntry, FloatEntry, IntEntry from werobot.utils import to_text def test_get_value(): instance = FakeIntance() instance.b = 6 instance.a = {'c': 'd'} assert get_value(instance, 'd', 'default') == 'default' assert get_value(instance, 'b'...
'd'
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
v2_extractor_at_anchor
offu/WeRoBot
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
train
train
tests/messages/test_entries.py
test_int_entry
assert
none_literal
13
import six from werobot.messages.entries import get_value, StringEntry, FloatEntry, IntEntry from werobot.utils import to_text def test_int_entry(): assert isinstance(t.test_int, int) assert t.test_int == 123 assert isinstance(t.test_string_to_int, int) assert t.test_string_to_int == 123 assert isi...
None
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
v2_extractor_at_anchor
offu/WeRoBot
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
train
train
tests/messages/test_entries.py
test_string_entry
assert
string_literal
10
import six from werobot.messages.entries import get_value, StringEntry, FloatEntry, IntEntry from werobot.utils import to_text def test_string_entry(): assert isinstance(t.test_string, six.text_type) assert t.test_string == "hello" assert isinstance(t.test_int_to_string, six.text_type) assert t.test_i...
"123"
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
v2_extractor_at_anchor
offu/WeRoBot
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
train
train
tests/messages/test_entries.py
test_float_entry
assert
numeric_literal
8
import six from werobot.messages.entries import get_value, StringEntry, FloatEntry, IntEntry from werobot.utils import to_text def test_float_entry(): assert isinstance(t.test_float, float) assert t.test_float ==
0.00001
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
v2_extractor_at_anchor
offu/WeRoBot
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
train
train
tests/messages/test_entries.py
test_string_entry
assert
string_literal
8
import six from werobot.messages.entries import get_value, StringEntry, FloatEntry, IntEntry from werobot.utils import to_text def test_string_entry(): assert isinstance(t.test_string, six.text_type) assert t.test_string ==
"hello"
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
v2_extractor_at_anchor
offu/WeRoBot
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
train
train
tests/messages/test_entries.py
test_string_entry
assert
string_literal
12
import six from werobot.messages.entries import get_value, StringEntry, FloatEntry, IntEntry from werobot.utils import to_text def test_string_entry(): assert isinstance(t.test_string, six.text_type) assert t.test_string == "hello" assert isinstance(t.test_int_to_string, six.text_type) assert t.test_in...
"1e-05"
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
v2_extractor_at_anchor
offu/WeRoBot
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
train
train
tests/messages/test_entries.py
test_get_value
assert
string_literal
10
import six from werobot.messages.entries import get_value, StringEntry, FloatEntry, IntEntry from werobot.utils import to_text def test_get_value(): instance = FakeIntance() instance.b = 6 instance.a = {'c': 'd'} assert get_value(instance, 'd', 'default') ==
'default'
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
v2_extractor_at_anchor
offu/WeRoBot
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
train
train
tests/messages/test_entries.py
test_string_entry
assert
func_call
14
import six from werobot.messages.entries import get_value, StringEntry, FloatEntry, IntEntry from werobot.utils import to_text def test_string_entry(): assert isinstance(t.test_string, six.text_type) assert t.test_string == "hello" assert isinstance(t.test_int_to_string, six.text_type) assert t.test_in...
to_text("喵")
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
v2_extractor_at_anchor
offu/WeRoBot
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
train
train
tests/test_client.py
check_menu_data
assert
variable
83
import os import responses import json import pytest import requests import multipart from six.moves import urllib from six import BytesIO from werobot import WeRoBot from werobot.config import Config from werobot.client import Client, check_error, ClientException from werobot.utils import cached_property BASE_DIR = ...
keys
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
v2_extractor_at_anchor
offu/WeRoBot
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
train
train
tests/test_client.py
test_id_and_secret
assert
string_literal
45
import os import responses import json import pytest import requests import multipart from six.moves import urllib from six import BytesIO from werobot import WeRoBot from werobot.config import Config from werobot.client import Client, check_error, ClientException from werobot.utils import cached_property BASE_DIR = ...
"123"
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
v2_extractor_at_anchor
offu/WeRoBot
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
train
train
tests/test_client.py
test_id_and_secret
assert
string_literal
46
import os import responses import json import pytest import requests import multipart from six.moves import urllib from six import BytesIO from werobot import WeRoBot from werobot.config import Config from werobot.client import Client, check_error, ClientException from werobot.utils import cached_property BASE_DIR = ...
"321"
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
v2_extractor_at_anchor
offu/WeRoBot
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
train
train
tests/test_client.py
article_callback
assert
string_literal
50
import os import responses import json import pytest import requests import multipart from six.moves import urllib from six import BytesIO from werobot import WeRoBot from werobot.config import Config from werobot.client import Client, check_error, ClientException from werobot.utils import cached_property BASE_DIR = ...
"news"
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
v2_extractor_at_anchor
offu/WeRoBot
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
train
train
tests/test_client.py
text_callback
assert
string_literal
50
import os import responses import json import pytest import requests import multipart from six.moves import urllib from six import BytesIO from werobot import WeRoBot from werobot.config import Config from werobot.client import Client, check_error, ClientException from werobot.utils import cached_property BASE_DIR = ...
"text"
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
v2_extractor_at_anchor
offu/WeRoBot
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
train
train
tests/test_client.py
upload_video_callback
assert
string_literal
49
import os import responses import json import pytest import requests import multipart from six.moves import urllib from six import BytesIO from werobot import WeRoBot from werobot.config import Config from werobot.client import Client, check_error, ClientException from werobot.utils import cached_property BASE_DIR = ...
"video"
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
v2_extractor_at_anchor
offu/WeRoBot
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
train
train
tests/test_client.py
image_callback
assert
string_literal
50
import os import responses import json import pytest import requests import multipart from six.moves import urllib from six import BytesIO from werobot import WeRoBot from werobot.config import Config from werobot.client import Client, check_error, ClientException from werobot.utils import cached_property BASE_DIR = ...
"image"
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
v2_extractor_at_anchor
offu/WeRoBot
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
train
train
tests/test_client.py
voice_callback
assert
string_literal
50
import os import responses import json import pytest import requests import multipart from six.moves import urllib from six import BytesIO from werobot import WeRoBot from werobot.config import Config from werobot.client import Client, check_error, ClientException from werobot.utils import cached_property BASE_DIR = ...
"voice"
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
v2_extractor_at_anchor
offu/WeRoBot
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
train
train
tests/test_client.py
music_callback
assert
string_literal
50
import os import responses import json import pytest import requests import multipart from six.moves import urllib from six import BytesIO from werobot import WeRoBot from werobot.config import Config from werobot.client import Client, check_error, ClientException from werobot.utils import cached_property BASE_DIR = ...
"music"
4dc8e008d926b610fc36613cad1c50f8f0a93c7a
52
v2_extractor_at_anchor