def test_pushdpopd(xonsh_builtins):
 xonsh_builtins.__xonsh_env__ = Env(CDPATH=PARENT, PWD=HERE)
 dirstack.cd([PARENT])
 owd = os.getcwd()
 assert (owd.casefold() == xonsh_builtins.__xonsh_env__['PWD'].casefold())
 dirstack.pushd([HERE])
 wd = os.getcwd()
 assert (wd.casefold() == HERE.casefold())
 dirstack.popd([])
 assert (owd.casefold() == os.getcwd().casefold()), 'popd returned cwd to expected dir'

def test_pushdpopd ( xonsh_builtins ) : xonsh_builtins . __xonsh_env__ = Env ( CDPATH = PARENT , PWD = HERE ) dirstack . cd ( [ PARENT ] ) owd = os . getcwd ( ) assert ( owd . casefold ( ) == xonsh_builtins . __xonsh_env__ [ 'PWD' ] . casefold ( ) ) dirstack . pushd ( [ HERE ] ) wd = os . getcwd ( ) assert ( wd . casefold ( ) == HERE . casefold ( ) ) dirstack . popd ( [ ] ) assert ( owd . casefold ( ) == os . getcwd ( ) . casefold ( ) ) , 'popd returned cwd to expected dir'
simple non-unc push/pop to verify we didnt break nonunc case .