def test_get_abs_path(tmpdir): expect = str(tmpdir) with tmpdir.as_cwd(): cli.get_abs_path('../') == os.path.dirname(expect) cli.get_abs_path('.') == expect cli.get_abs_path('./') == expect cli.get_abs_path(expect) == expect