mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
update tests appropriately
This commit is contained in:
parent
2076aac5de
commit
d474f10818
1 changed files with 7 additions and 6 deletions
|
@ -35,20 +35,21 @@ def xonsh_env(env):
|
|||
|
||||
def test_simple():
|
||||
load_builtins()
|
||||
with chdir(PARENT):
|
||||
assert_not_equal(os.getcwd(), HERE)
|
||||
dirstack.cd(["tests"])
|
||||
assert_equal(os.getcwd(), HERE)
|
||||
with xonsh_env(Env(CDPATH=PARENT, PWD=PARENT)):
|
||||
with chdir(PARENT):
|
||||
assert_not_equal(os.getcwd(), HERE)
|
||||
dirstack.cd(["tests"])
|
||||
assert_equal(os.getcwd(), HERE)
|
||||
|
||||
def test_cdpath_simple():
|
||||
with xonsh_env(Env(CDPATH=PARENT)):
|
||||
with xonsh_env(Env(CDPATH=PARENT, PWD=HERE)):
|
||||
with chdir(os.path.normpath("/")):
|
||||
assert_not_equal(os.getcwd(), HERE)
|
||||
dirstack.cd(["tests"])
|
||||
assert_equal(os.getcwd(), HERE)
|
||||
|
||||
def test_cdpath_collision():
|
||||
with xonsh_env(Env(CDPATH=PARENT)):
|
||||
with xonsh_env(Env(CDPATH=PARENT, PWD=HERE)):
|
||||
sub_tests = os.path.join(HERE, "tests")
|
||||
if not os.path.exists(sub_tests):
|
||||
os.mkdir(sub_tests)
|
||||
|
|
Loading…
Add table
Reference in a new issue