move slowest python-specific tests out of repository_test

This commit is contained in:
marsha 2023-03-12 08:24:38 -05:00
parent 950451e1ef
commit d3c0a66d23
2 changed files with 51 additions and 29 deletions

View file

@ -82,35 +82,6 @@ def _test_hook_repo(
assert out == expected
def test_python_hook(tempdir_factory, store):
_test_hook_repo(
tempdir_factory, store, 'python_hooks_repo',
'foo', [os.devnull],
f'[{os.devnull!r}]\nHello World\n'.encode(),
)
def test_python_hook_default_version(tempdir_factory, store):
# make sure that this continues to work for platforms where default
# language detection does not work
with mock.patch.object(
python,
'get_default_version',
return_value=C.DEFAULT,
):
test_python_hook(tempdir_factory, store)
def test_python_hook_weird_setup_cfg(in_git_dir, tempdir_factory, store):
in_git_dir.join('setup.cfg').write('[install]\ninstall_scripts=/usr/sbin')
_test_hook_repo(
tempdir_factory, store, 'python_hooks_repo',
'foo', [os.devnull],
f'[{os.devnull!r}]\nHello World\n'.encode(),
)
def test_python_venv_deprecation(store, caplog):
config = {
'repo': 'local',