(tempdir_factory, store)
| 164 | |
| 165 | |
| 166 | def test_additional_dependencies_roll_forward(tempdir_factory, store): |
| 167 | path = make_repo(tempdir_factory, 'python_hooks_repo') |
| 168 | |
| 169 | config1 = make_config_from_repo(path) |
| 170 | hook1 = _get_hook(config1, store, 'foo') |
| 171 | with python.in_env(hook1.prefix, hook1.language_version): |
| 172 | assert 'mccabe' not in cmd_output('pip', 'freeze', '-l')[1] |
| 173 | |
| 174 | # Make another repo with additional dependencies |
| 175 | config2 = make_config_from_repo(path) |
| 176 | config2['hooks'][0]['additional_dependencies'] = ['mccabe'] |
| 177 | hook2 = _get_hook(config2, store, 'foo') |
| 178 | with python.in_env(hook2.prefix, hook2.language_version): |
| 179 | assert 'mccabe' in cmd_output('pip', 'freeze', '-l')[1] |
| 180 | |
| 181 | # should not have affected original |
| 182 | with python.in_env(hook1.prefix, hook1.language_version): |
| 183 | assert 'mccabe' not in cmd_output('pip', 'freeze', '-l')[1] |
| 184 | |
| 185 | |
| 186 | @pytest.mark.parametrize('v', ('v1', 'v2')) |
nothing calls this directly
no test coverage detected