Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: vpython/venv/venv_test.go

Issue 2744933003: Re-enable vpython/venv's TestVirtualEnv. (Closed)
Patch Set: better comment Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « vpython/venv/venv_resources_test.go ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The LUCI Authors. All rights reserved. 1 // Copyright 2017 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package venv 5 package venv
6 6
7 import ( 7 import (
8 "encoding/json" 8 "encoding/json"
9 "fmt" 9 "fmt"
10 "io/ioutil" 10 "io/ioutil"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 So(v.Delete(c), ShouldBeNil) 172 So(v.Delete(c), ShouldBeNil)
173 return nil 173 return nil
174 }) 174 })
175 So(err, ShouldBeNil) 175 So(err, ShouldBeNil)
176 })) 176 }))
177 } 177 }
178 178
179 func TestVirtualEnv(t *testing.T) { 179 func TestVirtualEnv(t *testing.T) {
180 t.Parallel() 180 t.Parallel()
181 181
182 // TODO(dnj): Identify flake and fix.
183 t.Skip("Test is currently flaky, will re-enable once resolved.")
184
185 for _, tc := range []struct { 182 for _, tc := range []struct {
186 name string 183 name string
187 ri *resolvedInterpreter 184 ri *resolvedInterpreter
188 }{ 185 }{
189 {"python27", python27}, 186 {"python27", python27},
190 {"python3", python3}, 187 {"python3", python3},
191 } { 188 } {
192 tc := tc 189 tc := tc
193 190
194 t.Run(fmt.Sprintf(`Testing Virtualenv for: %s`, tc.name), func(t *testing.T) { 191 t.Run(fmt.Sprintf(`Testing Virtualenv for: %s`, tc.name), func(t *testing.T) {
195 testVirtualEnvWith(t, tc.ri) 192 testVirtualEnvWith(t, tc.ri)
196 }) 193 })
197 } 194 }
198 } 195 }
199 196
200 func loadJSON(path string, dst interface{}) error { 197 func loadJSON(path string, dst interface{}) error {
201 content, err := ioutil.ReadFile(path) 198 content, err := ioutil.ReadFile(path)
202 if err != nil { 199 if err != nil {
203 return errors.Annotate(err).Reason("failed to open file").Err() 200 return errors.Annotate(err).Reason("failed to open file").Err()
204 } 201 }
205 if err := json.Unmarshal(content, dst); err != nil { 202 if err := json.Unmarshal(content, dst); err != nil {
206 return errors.Annotate(err).Reason("failed to unmarshal JSON").E rr() 203 return errors.Annotate(err).Reason("failed to unmarshal JSON").E rr()
207 } 204 }
208 return nil 205 return nil
209 } 206 }
OLDNEW
« no previous file with comments | « vpython/venv/venv_resources_test.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698