(repo_with_failing_hook, store, tempdir_factory)
| 736 | |
| 737 | |
| 738 | def test_stdout_write_bug_py26(repo_with_failing_hook, store, tempdir_factory): |
| 739 | with cwd(repo_with_failing_hook): |
| 740 | with modify_config() as config: |
| 741 | config['repos'][0]['hooks'][0]['args'] = ['☃'] |
| 742 | stage_a_file() |
| 743 | |
| 744 | install(C.CONFIG_FILE, store, hook_types=['pre-commit']) |
| 745 | |
| 746 | # Have to use subprocess because pytest monkeypatches sys.stdout |
| 747 | _, out = git_commit( |
| 748 | fn=cmd_output_mocked_pre_commit_home, |
| 749 | tempdir_factory=tempdir_factory, |
| 750 | check=False, |
| 751 | ) |
| 752 | assert 'UnicodeEncodeError' not in out |
| 753 | # Doesn't actually happen, but a reasonable assertion |
| 754 | assert 'UnicodeDecodeError' not in out |
| 755 | |
| 756 | |
| 757 | def test_lots_of_files(store, tempdir_factory): |
nothing calls this directly
no test coverage detected