mirror of
https://github.com/TheLocehiliosan/yadm
synced 2024-10-27 20:34:27 +00:00
Remove old-style alts from test data
This commit is contained in:
parent
3d10309665
commit
59da359e63
@ -445,15 +445,6 @@ def ds1_dset(tst_sys):
|
|||||||
dset = DataSet()
|
dset = DataSet()
|
||||||
dset.add_file('t1')
|
dset.add_file('t1')
|
||||||
dset.add_file('d1/t2')
|
dset.add_file('d1/t2')
|
||||||
dset.add_file(f'test_alt##S')
|
|
||||||
dset.add_file(f'test_alt##S.H')
|
|
||||||
dset.add_file(f'test_alt##S.H.U')
|
|
||||||
dset.add_file(f'test_alt##C.S.H.U')
|
|
||||||
dset.add_file(f'test alt/test alt##S')
|
|
||||||
dset.add_file(f'test alt/test alt##S.H')
|
|
||||||
dset.add_file(f'test alt/test alt##S.H.U')
|
|
||||||
dset.add_file(f'test alt/test alt##C.S.H.U')
|
|
||||||
dset.add_file(f'test_alt_copy##{tst_sys}')
|
|
||||||
dset.add_file(f'test_alt_copy##os.{tst_sys}')
|
dset.add_file(f'test_alt_copy##os.{tst_sys}')
|
||||||
dset.add_file('u1', tracked=False)
|
dset.add_file('u1', tracked=False)
|
||||||
dset.add_file('d2/u2', tracked=False)
|
dset.add_file('d2/u2', tracked=False)
|
||||||
|
@ -8,8 +8,6 @@ import pytest
|
|||||||
'cygwin',
|
'cygwin',
|
||||||
[pytest.param(True, marks=pytest.mark.deprecated), False],
|
[pytest.param(True, marks=pytest.mark.deprecated), False],
|
||||||
ids=['cygwin', 'no-cygwin'])
|
ids=['cygwin', 'no-cygwin'])
|
||||||
@pytest.mark.parametrize(
|
|
||||||
'compatibility', [True, False], ids=['compat', 'no-compat'])
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'setting, expect_link, pre_existing', [
|
'setting, expect_link, pre_existing', [
|
||||||
(None, True, None),
|
(None, True, None),
|
||||||
@ -29,7 +27,7 @@ import pytest
|
|||||||
def test_alt_copy(
|
def test_alt_copy(
|
||||||
runner, yadm_y, paths, tst_sys,
|
runner, yadm_y, paths, tst_sys,
|
||||||
setting, expect_link, pre_existing,
|
setting, expect_link, pre_existing,
|
||||||
compatibility, cygwin):
|
cygwin):
|
||||||
"""Test yadm.alt-copy"""
|
"""Test yadm.alt-copy"""
|
||||||
|
|
||||||
option = 'yadm.cygwin-copy' if cygwin else 'yadm.alt-copy'
|
option = 'yadm.cygwin-copy' if cygwin else 'yadm.alt-copy'
|
||||||
@ -37,9 +35,6 @@ def test_alt_copy(
|
|||||||
if setting is not None:
|
if setting is not None:
|
||||||
os.system(' '.join(yadm_y('config', option, str(setting))))
|
os.system(' '.join(yadm_y('config', option, str(setting))))
|
||||||
|
|
||||||
if compatibility:
|
|
||||||
expected_content = f'test_alt_copy##{tst_sys}'
|
|
||||||
else:
|
|
||||||
expected_content = f'test_alt_copy##os.{tst_sys}'
|
expected_content = f'test_alt_copy##os.{tst_sys}'
|
||||||
|
|
||||||
alt_path = paths.work.join('test_alt_copy')
|
alt_path = paths.work.join('test_alt_copy')
|
||||||
@ -48,11 +43,7 @@ def test_alt_copy(
|
|||||||
elif pre_existing == 'file':
|
elif pre_existing == 'file':
|
||||||
alt_path.write('wrong content')
|
alt_path.write('wrong content')
|
||||||
|
|
||||||
env = os.environ.copy()
|
run = runner(yadm_y('alt'))
|
||||||
if compatibility:
|
|
||||||
env['YADM_COMPATIBILITY'] = '1'
|
|
||||||
|
|
||||||
run = runner(yadm_y('alt'), env=env)
|
|
||||||
assert run.success
|
assert run.success
|
||||||
assert run.err == ''
|
assert run.err == ''
|
||||||
assert 'Linking' in run.out
|
assert 'Linking' in run.out
|
||||||
|
Loading…
Reference in New Issue
Block a user