Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testutils.go renamed to testutils_test.go #4

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

denisov
Copy link
Contributor

@denisov denisov commented Aug 20, 2016

testutils.go imports the testing package. It shouldn't be builded otherwise "flag" package shows all flags from the "testing" package

Check this example:

package main

import (
    "flag"
    "gopkg.in/masci/flickr.v2"
    "fmt"
)

func main()  {
    fmt.Println(flickr.API_ENDPOINT)
    flag.String("config", "config.yml", "config file name")
    flag.Parse()
}
$ go run t.go -h                                                                                            
https://api.flickr.com/services/rest
Usage of /tmp/go-build828178872/command-line-arguments/_obj/exe/t:
-config string
config file name (default "config.yml")
-httptest.serve string
if non-empty, httptest.NewServer serves on this address and blocks
-test.bench string
regular expression per path component to select benchmarks to run
-test.benchmem
print memory allocations for benchmarks
-test.benchtime duration
approximate run time for each benchmark (default 1s)
-test.blockprofile string
write a goroutine blocking profile to the named file after execution
-test.blockprofilerate int
if >= 0, calls runtime.SetBlockProfileRate() (default 1)
-test.count n
run tests and benchmarks n times (default 1)
-test.coverprofile string
write a coverage profile to the named file after execution
-test.cpu string
comma-separated list of number of CPUs to use for each test
-test.cpuprofile string
write a cpu profile to the named file during execution
-test.memprofile string
write a memory profile to the named file after execution
-test.memprofilerate int
if >=0, sets runtime.MemProfileRate
-test.outputdir string
directory in which to write profiles
-test.parallel int
maximum test parallelism (default 4)
-test.run string
regular expression to select tests and examples to run
-test.short
run smaller test suite to save time
-test.timeout duration
if positive, sets an aggregate time limit for all tests
-test.trace string
write an execution trace to the named file after execution
-test.v
verbose: print additional output
exit status 2

It shows all flags from the "testing" package.

The fixed output:

$ go run t.go -h                                                                                            
https://api.flickr.com/services/rest
Usage of /tmp/go-build954800689/command-line-arguments/_obj/exe/t:
-config string
config file name (default "config.yml")
exit status 2

@denisov
Copy link
Contributor Author

denisov commented Aug 20, 2016

Hmm, Travis Ci failed for some reason :( But /runtests.sh works fine on my local PC

@masci
Copy link
Owner

masci commented Aug 29, 2016

Hi @denisov thanks for your code!
I think the tests are failing b/c they import flickr from gopkg.in/... and Expect is not there anymore.
Let me go in deep on this before merging, will try to reproduce travis' results.

testutils.go imports the testing package. It shouldn't be builded otherwise "flag" package shows all flags from the "testing" package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants