def test_shellescape_relpath_longer(tmpdir): tmpdir.chdir() path = Path('/a/b') args = (path.strpath, ) assert venv_update.shellescape(args) == path.strpath
def test_shellescape_relpath(path, expected, tmpdir): tmpdir.chdir() tmpfile = tmpdir.join(path) args = (tmpfile.strpath, ) assert venv_update.shellescape(args) == expected assert expected != tmpfile.strpath
def test_shellescape(args, expected): assert venv_update.shellescape(args) == expected
def test_shellescape_relpath_longer(tmpdir): tmpdir.chdir() path = Path('/a/b') args = (path.strpath,) assert venv_update.shellescape(args) == path.strpath
def test_shellescape_relpath(path, expected, tmpdir): tmpdir.chdir() tmpfile = tmpdir.join(path) args = (tmpfile.strpath,) assert venv_update.shellescape(args) == expected assert expected != tmpfile.strpath