| 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"}
|
|
|