3
// Provides an EnvSuite type which makes sure this test suite gets an isolated
4
// environment settings. Settings will be saved on start and then cleared, and
8
. "launchpad.net/gocheck"
13
type EnvSuite struct {
17
func (s *EnvSuite) SetUpSuite(c *C) {
18
s.environ = os.Environ()
21
func (s *EnvSuite) SetUpTest(c *C) {
25
func (s *EnvSuite) TearDownTest(c *C) {
26
for _, envstring := range s.environ {
27
kv := strings.SplitN(envstring, "=", 2)
28
os.Setenv(kv[0], kv[1])
32
func (s *EnvSuite) TearDownSuite(c *C) {