datalad_next.tests

Tooling for test implementations

BasicGitTestRepo([path, puke_if_exists])

Creates a basic test git repository.

DEFAULT_BRANCH

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

DEFAULT_REMOTE

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

assert_in(first, second[, msg])

assert_in_results(results, **kwargs)

Verify that the particular combination of keys and values is found in one of the results

assert_result_count(results, n, **kwargs)

Verify specific number of results (matching criteria, if any)

assert_status(label, results)

Verify that each status dict in the results has a given status label

create_tree(path, tree[, ...])

Given a list of tuples (name, load) create such a tree

eq_(first, second[, msg])

get_deeply_nested_structure(path)

Here is what this does (assuming UNIX, locked): | .

ok_(expr[, msg])

ok_good_symlink(path)

ok_broken_symlink(path)

run_main(args[, exit_code, expect_stderr])

Run main() of the datalad, do basic checks and provide outputs

skip_if_on_windows([func])

Skip test completely under Windows

skip_if_root([func])

Skip test if uid == 0.

skip_wo_symlink_capability(func)

Skip test when environment does not support symlinks

swallow_logs([new_level, file_, name])

Context manager to consume all logs.

skipif_no_network

A decorator for applying a mark on test functions and classes.