handle os.path.realpath in PyPathEvaluator (PY-9787)

This commit is contained in:
Dmitry Jemerov
2013-08-07 17:25:58 +02:00
parent 0a949a96ea
commit 2ceb00adf9
2 changed files with 3 additions and 1 deletions
@@ -70,6 +70,7 @@ public class PyNames {
public static final String DIRNAME = "dirname";
public static final String ABSPATH = "abspath";
public static final String NORMPATH = "normpath";
public static final String REALPATH = "realpath";
public static final String JOIN = "join";
public static final String REPLACE = "replace";
public static final String FILE = "__file__";
@@ -41,7 +41,8 @@ public class PyPathEvaluator extends PyEvaluator {
else if (call.isCalleeText(PyNames.JOIN) && args.length >= 1) {
return evaluatePathInJoin(args, args.length);
}
else if (call.isCalleeText(PyNames.NORMPATH) && args.length == 1) {
else if (call.isCalleeText(PyNames.NORMPATH, PyNames.REALPATH) && args.length == 1) {
// we don't care about the exact transformation performed by python but need to preserve the availability of the path
return evaluate(args[0]);
}
else if (call.isCalleeText(PyNames.ABSPATH) && args.length == 1) {