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

Unified Diff: vpython/python/python_test.go

Issue 2702873002: vpython: Add primary execution package. (Closed)
Patch Set: more windows signals 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vpython/python/python.go ('k') | vpython/run.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vpython/python/python_test.go
diff --git a/vpython/python/python_test.go b/vpython/python/python_test.go
index 7fee69dad3df0f2e61debc161a791162cb4d38a8..c7335fd7f695034324e729bc6ec0da863bf10cfb 100644
--- a/vpython/python/python_test.go
+++ b/vpython/python/python_test.go
@@ -23,48 +23,45 @@ func TestParsePythonCommandLine(t *testing.T) {
args []string
cmd CommandLine
}{
- {nil, CommandLine{}},
+ {nil, CommandLine{Target: NoTarget{}}},
{[]string{"-a", "-b", "-Q'foo.bar.baz'", "-Wbar"},
CommandLine{
- Flags: []string{"-a", "-b", "-Q'foo.bar.baz'", "-Wbar"},
- Args: []string{},
+ Target: NoTarget{},
+ Flags: []string{"-a", "-b", "-Q'foo.bar.baz'", "-Wbar"},
+ Args: []string{},
},
},
{[]string{"path.py", "--", "foo", "bar"},
CommandLine{
- Type: TargetScript,
- Value: "path.py",
- Flags: []string{},
- Args: []string{"--", "foo", "bar"},
+ Target: ScriptTarget{"path.py"},
+ Flags: []string{},
+ Args: []string{"--", "foo", "bar"},
},
},
{[]string{"-a", "-Wfoo", "-", "--", "foo"},
CommandLine{
- Type: TargetScript,
- Value: "-",
- Flags: []string{"-a", "-Wfoo"},
- Args: []string{"--", "foo"},
+ Target: ScriptTarget{"-"},
+ Flags: []string{"-a", "-Wfoo"},
+ Args: []string{"--", "foo"},
},
},
{[]string{"-a", "-b", "-W", "foo", "-Wbar", "-c", "<script>", "--", "arg"},
CommandLine{
- Type: TargetCommand,
- Value: "<script>",
- Flags: []string{"-a", "-b", "-W", "foo", "-Wbar"},
- Args: []string{"--", "arg"},
+ Target: CommandTarget{"<script>"},
+ Flags: []string{"-a", "-b", "-W", "foo", "-Wbar"},
+ Args: []string{"--", "arg"},
},
},
{[]string{"-a", "-b", "-m'foo.bar.baz'", "arg"},
CommandLine{
- Type: TargetModule,
- Value: "'foo.bar.baz'",
- Flags: []string{"-a", "-b"},
- Args: []string{"arg"},
+ Target: ModuleTarget{"'foo.bar.baz'"},
+ Flags: []string{"-a", "-b"},
+ Args: []string{"arg"},
},
},
}
@@ -174,19 +171,6 @@ func TestInterpreter(t *testing.T) {
})
})
- Convey(`Can connect STDIN.`, func() {
- cmd.ConnectSTDIN = true
-
- So(cmd.Run(c, "foo", "bar"), ShouldBeNil)
- So(lastCmd, ShouldResemble, &exec.Cmd{
- Path: "/path/to/python",
- Args: []string{"/path/to/python", "foo", "bar"},
- Stdout: os.Stdout,
- Stderr: os.Stderr,
- Stdin: os.Stdin,
- })
- })
-
Convey(`Will forward a working directory and enviornment`, func() {
cmd.WorkDir = "zugzug"
cmd.Env = []string{"pants=on"}
« no previous file with comments | « vpython/python/python.go ('k') | vpython/run.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698