(self, setgroups)
| 906 | |
| 907 | @patch('os.setgroups', create=True) |
| 908 | def test_setgroups_hack_ValueError(self, setgroups): |
| 909 | |
| 910 | def on_setgroups(groups): |
| 911 | if len(groups) <= 200: |
| 912 | setgroups.return_value = True |
| 913 | return |
| 914 | raise ValueError() |
| 915 | |
| 916 | setgroups.side_effect = on_setgroups |
| 917 | _setgroups_hack(list(range(400))) |
| 918 | |
| 919 | setgroups.side_effect = ValueError() |
| 920 | with pytest.raises(ValueError): |
| 921 | _setgroups_hack(list(range(400))) |
| 922 | |
| 923 | @patch('os.setgroups', create=True) |
| 924 | def test_setgroups_hack_OSError(self, setgroups): |
nothing calls this directly
no test coverage detected