Using this code in Python 3.4 and Ubuntu 14.04 do not return True
import pathlib
path1 = pathlib.Path("/tmp")
path2 = pathlib.Path("/tmp/../tmp")
print(path1 == path2)
# gives False
print(path1 is path2)
# gives False
But normally "/tmp" and "/tmp/../tmp" are the same folder. So how to ensure that the comparisons return True?