def test_get_backupdir_path_given_datadir_with_slash(tmp_path):
    'Returns backups Path named for specified working directory ending with slash.'
    os.chdir(tmp_path)
    Path(CONFIGFILE_NAME).write_text('config stuff')
    workingdir = Path(tmp_path).joinpath('todolists/a/')
    workingdir.mkdir(parents=True, exist_ok=True)
    workingdir_shortname_expected = 'todolists_a'
    backdir = '_backups'
    datestr = '2020-01-03_1646_06488910'
    actual = get_backupdir_path(datadir=workingdir, backdir=backdir, now=datestr)
    expected = (((Path(tmp_path) / backdir) / workingdir_shortname_expected) / datestr)
    assert (actual == expected)
Returns backups Path named for specified working directory ending with slash.
def test_get_backupdir_path_given_datadir_with_slash(tmp_path):
    
    os.chdir(tmp_path)
    Path(CONFIGFILE_NAME).write_text('config stuff')
    workingdir = Path(tmp_path).joinpath('todolists/a/')
    workingdir.mkdir(parents=True, exist_ok=True)
    workingdir_shortname_expected = 'todolists_a'
    backdir = '_backups'
    datestr = '2020-01-03_1646_06488910'
    actual = get_backupdir_path(datadir=workingdir, backdir=backdir, now=datestr)
    expected = (((Path(tmp_path) / backdir) / workingdir_shortname_expected) / datestr)
    assert (actual == expected)