test_cd.ipy
18 lines
| 289 B
| text/plain
|
TextLexer
/ test / test_cd.ipy
vivainio
|
r856 | # assumes there is /tmp and /opt | ||
def curpath(): | ||||
cwd = os.path.splitdrive(os.getcwd())[1].replace('\\','/') | ||||
print cwd | ||||
return cwd | ||||
vivainio
|
r181 | import os | ||
cd / | ||||
vivainio
|
r856 | assert curpath() == '/' | ||
vivainio
|
r181 | %cd /tmp | ||
vivainio
|
r856 | assert curpath() == '/tmp' | ||
pushd /opt | ||||
assert curpath() == '/opt' | ||||
popd | ||||
assert curpath() == '/tmp' | ||||
vivainio
|
r181 | |||