diff --git a/datalad_next/patches/tests/test_push.py b/datalad_next/patches/tests/test_push.py index 7f2c809e..d8f1f18b 100644 --- a/datalad_next/patches/tests/test_push.py +++ b/datalad_next/patches/tests/test_push.py @@ -57,10 +57,18 @@ def test_nested_pushclone_cycle_allplatforms(origpath=None, storepath=None, clon from datalad.cmd import WitlessRunner as Runner run = Runner().run + os.environ['DATALAD_EXTENSIONS_LOAD'] = 'next' + # create original nested dataset with chpwd(origpath): - run(['datalad', 'create', 'super']) - run(['datalad', 'create', '-d', 'super', str(Path('super', 'sub'))]) + run(['datalad', 'create', 'super'], env=os.environ) + run( + [ + 'datalad', 'create', '-d', 'super', + str(Path('super', 'sub')) + ], + env=os.environ + ) # verify essential linkage properties orig_super = Dataset(Path(origpath, 'super')) @@ -69,7 +77,7 @@ def test_nested_pushclone_cycle_allplatforms(origpath=None, storepath=None, clon (orig_super.pathobj / 'file1.txt').write_text('some1') (orig_sub.pathobj / 'file2.txt').write_text('some1') with chpwd(orig_super.path): - run(['datalad', 'save', '--recursive']) + run(['datalad', 'save', '--recursive'], env=os.environ) # TODO not yet reported clean with adjusted branches #assert_repo_status(orig_super.path) @@ -93,9 +101,17 @@ def test_nested_pushclone_cycle_allplatforms(origpath=None, storepath=None, clon # (i.e. no impact of an annex-init of any kind) store_url = 'ria+' + get_local_file_url(storepath) with chpwd(orig_super.path): - run(['datalad', 'create-sibling-ria', '--recursive', - '-s', 'store', store_url, '--new-store-ok']) - run(['datalad', 'push', '--recursive', '--to', 'store']) + run( + [ + 'datalad', 'create-sibling-ria', '--recursive', + '-s', 'store', store_url, '--new-store-ok' + ], + env=os.environ + ) + run( + ['datalad', 'push', '--recursive', '--to', 'store'], + env=os.environ + ) # we are using the 'store' sibling's URL, which should be a plain path store_super = AnnexRepo(orig_super.siblings(name='store')[0]['url'], init=False) @@ -109,8 +125,14 @@ def test_nested_pushclone_cycle_allplatforms(origpath=None, storepath=None, clon # and reobtain from a store cloneurl = 'ria+' + get_local_file_url(str(storepath), compatibility='git') with chpwd(clonepath): - run(['datalad', 'clone', cloneurl + '#' + orig_super.id, 'super']) - run(['datalad', '-C', 'super', 'get', '--recursive', '.']) + run( + ['datalad', 'clone', cloneurl + '#' + orig_super.id, 'super'], + env=os.environ + ) + run( + ['datalad', '-C', 'super', 'get', '--recursive', '.'], + env=os.environ + ) # verify that nothing has changed as a result of a push/clone cycle clone_super = Dataset(Path(clonepath, 'super'))