code stringlengths 3 6.57k |
|---|
pytest.raises(SystemExit) |
autofix_lib._interactive_check(use_color=False) |
capfd.readouterr() |
test_interactive_quit(mock_input, capfd) |
mock_input.set_side_effect('q') |
pytest.raises(SystemExit) |
autofix_lib._interactive_check(use_color=False) |
capfd.readouterr() |
test_interactive_yes(mock_input, capfd) |
mock_input.set_side_effect('y') |
autofix_lib._interactive_check(use_color=False) |
capfd.readouterr() |
test_interactive_no(mock_input, capfd) |
mock_input.set_side_effect('n') |
autofix_lib._interactive_check(use_color=False) |
capfd.readouterr() |
test_interactive_shell(mock_input, capfd) |
mock_input.set_side_effect('s', 'n') |
mock.patch.dict(os.environ, {'SHELL': 'echo'}) |
autofix_lib._interactive_check(use_color=False) |
capfd.readouterr() |
test_interactive_help(mock_input, capfd) |
mock_input.set_side_effect('?', 'n') |
autofix_lib._interactive_check(use_color=False) |
capfd.readouterr() |
y (yes) |
n (no) |
s (shell) |
q (quit, ^C) |
test_interactive_garbage(mock_input, capfd) |
mock_input.set_side_effect('garbage', 'n') |
autofix_lib._interactive_check(use_color=False) |
capfd.readouterr() |
y (yes) |
n (no) |
s (shell) |
q (quit, ^C) |
lower_case_f() |
open('f') |
read() |
open('f', 'w') |
f.write(f_contents.lower() |
failing_check_fix() |
AssertionError('nope!') |
test_fix_dry_run_no_change(file_config_files, capfd) |
str(file_config_files.output_dir.join('repo1') |
str(file_config_files.output_dir.join('repo2') |
load_config(file_config_files.cfg) |
autofix_lib.Commit('message!', 'test-branch', None) |
capfd.readouterr() |
file_config_files.dir1.join('f') |
read() |
file_config_files.dir2.join('f') |
read() |
test_fix_with_limit(file_config_files, capfd) |
str(file_config_files.output_dir.join('repo1') |
str(file_config_files.output_dir.join('repo2') |
load_config(file_config_files.cfg) |
autofix_lib.Commit('message!', 'test-branch', None) |
capfd.readouterr() |
test_fix_interactive(file_config_files, capfd, mock_input) |
mock_input.set_side_effect('y', 'n') |
str(file_config_files.output_dir.join('repo1') |
str(file_config_files.output_dir.join('repo2') |
load_config(file_config_files.cfg) |
autofix_lib.Commit('message!', 'test-branch', None) |
file_config_files.dir1.join('f') |
read() |
file_config_files.dir2.join('f') |
read() |
test_autofix_makes_commits(file_config_files, capfd) |
str(file_config_files.output_dir.join('repo1') |
str(file_config_files.output_dir.join('repo2') |
load_config(file_config_files.cfg) |
autofix_lib.Commit('message!', 'test-branch', 'A B <a@a.a>') |
capfd.readouterr() |
file_config_files.dir1.join('f') |
read() |
file_config_files.dir2.join('f') |
read() |
decode() |
decode() |
commit.endswith('-OHAI\n+ohai\n') |
test_fix_failing_check_no_changes(file_config_files, capfd) |
str(file_config_files.output_dir.join('repo1') |
str(file_config_files.output_dir.join('repo2') |
load_config(file_config_files.cfg) |
autofix_lib.Commit('message!', 'test-branch', None) |
capfd.readouterr() |
out.count('Errored') |
file_config_files.dir1.join('f') |
read() |
file_config_files.dir2.join('f') |
read() |
test_noop_does_not_commit(file_config_files) |
testing.git.revparse(file_config_files.dir1) |
testing.git.revparse(file_config_files.dir2) |
str(file_config_files.output_dir.join('repo1') |
str(file_config_files.output_dir.join('repo2') |
load_config(file_config_files.cfg) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.