'test basic pushd functionality'

def test_pushd(self):

    old_wd1 = sh.pwd().strip()
    old_wd2 = os.getcwd()
    self.assertEqual(old_wd1, old_wd2)
    self.assertNotEqual(old_wd1, tempdir)
    with sh.pushd(tempdir):
        new_wd1 = sh.pwd().strip()
        new_wd2 = os.getcwd()
    old_wd3 = sh.pwd().strip()
    old_wd4 = os.getcwd()
    self.assertEqual(old_wd3, old_wd4)
    self.assertEqual(old_wd1, old_wd3)
    self.assertEqual(new_wd1, tempdir)
    self.assertEqual(new_wd2, tempdir)
