2 from __future__ import absolute_import
3 from os.path import dirname, realpath
11 from bup import helpers
12 from bup.compat import environ, fsencode
15 _bup_src_top = realpath(dirname(fsencode(__file__)))
17 # The "pwd -P" here may not be appropriate in the long run, but we
18 # need it until we settle the relevant drecurse/exclusion questions:
19 # https://groups.google.com/forum/#!topic/bup-list/9ke-Mbp10Q0
20 os.chdir(realpath(os.getcwd()))
22 @pytest.fixture(autouse=True)
23 def ephemeral_env_changes():
24 orig_env = environ.copy()
26 for k, orig_v in orig_env.items():
32 for k in environ.keys():
37 os.chdir(_bup_src_top)