def test_sethomedir():
-> old = py.path.local.get_temproot().chdir()
try:
sethomedir()
curdir = py.path.local()
finally:
old.chdir()
assert py.path.local._gethomedir() == curdir