@with_tree(tree={'1.tar.gz': {'bu.dat': ('52055957098986598349795121365535' * 10000), 'bu3.dat': ('8236397048205454767887168342849275422' * 10000)}, '2.tar.gz': {'bu2.dat': ('17470674346319559612580175475351973007892815102' * 10000)}})
@serve_path_via_http()
@with_tempfile
def check_observe_tqdm(topdir=None, topurl=None, outdir=None):
    from datalad.api import add_archive_content, create
    ds = create(outdir)
    for f in ('1.tar.gz', '2.tar.gz'):
        with chpwd(outdir):
            ds.repo.add_url_to_file(f, (topurl + f))
            ds.save(f)
            add_archive_content(f, delete=True, drop_after=True)
    files = glob.glob(op.join(outdir, '*'))
    ds.drop(files)
    ds.repo.drop([], options=['--all', '--fast'])
    ds.get(files)
    ds.repo.drop([], options=['--all', '--fast'])
    print(outdir)
    while True:
        sleep(0.1)
@with_tree(tree={'1.tar.gz': {'bu.dat': ('52055957098986598349795121365535' * 10000), 'bu3.dat': ('8236397048205454767887168342849275422' * 10000)}, '2.tar.gz': {'bu2.dat': ('17470674346319559612580175475351973007892815102' * 10000)}})
@serve_path_via_http()
@with_tempfile
def check_observe_tqdm(topdir=None, topurl=None, outdir=None):
    from datalad.api import add_archive_content, create
    ds = create(outdir)
    for f in ('1.tar.gz', '2.tar.gz'):
        with chpwd(outdir):
            ds.repo.add_url_to_file(f, (topurl + f))
            ds.save(f)
            add_archive_content(f, delete=True, drop_after=True)
    files = glob.glob(op.join(outdir, '*'))
    ds.drop(files)
    ds.repo.drop([], options=['--all', '--fast'])
    ds.get(files)
    ds.repo.drop([], options=['--all', '--fast'])
    print(outdir)
    while True:
        sleep(0.1)