def test_make_flat_name_none_is_dir_extension(): flat_name = utils.make_flat_name(PATH_LIST, is_dir=True, ext=None) assert flat_name == PATH_ROOT
def test_make_flat_name_empty_extension(): flat_name = utils.make_flat_name(PATH_LIST, ext="") assert flat_name == f"{PATH_ROOT}-file"
def test_make_flat_name_extension(): ext = ".txt" flat_name = utils.make_flat_name(PATH_LIST, ext=ext) assert flat_name == f"{PATH_ROOT}-file{ext}"
def test_make_flat_name_is_dir(): flat_name = utils.make_flat_name(PATH_LIST, is_dir=True) assert flat_name == f"{PATH_ROOT}-toc.rst"
def test_make_flat_name_with_filename_root(): flat_name = utils.make_flat_name(PATH_LIST, filename_root="root") assert flat_name == f"{PATH_ROOT}.root-file.rst"
def test_make_flat_name(): assert utils.make_flat_name(PATH_LIST) == f"{PATH_ROOT}-file.rst"