dousha4804 2019-05-22 15:46
浏览 40

简单测试失败

I am attempting to use Convey for the first time. My real test fails for an unknown reason, so I created this very simple test and it fails the same way.

   GO Convey
func TestSimple(t *testing.T) {
    Convey("Given Simple Test", t, func() {
        Convey("When Tested", func() {
            Convey("There should be a result", func() {
                i := 1
                So(i, ShouldEqual, i)
            })
        })
    })
}

I am probably doing something wrong, however I'm at a loss

UPDATE: I found an old Convey test in another app that works. I copied the simple test to it and ran tests. it works.

Is there something that is possibly configured wrong? It is the same server and go setup.

Screen shot of test

  • 写回答

1条回答 默认 最新

  • doufei1852 2019-07-08 12:50
    关注

    It may be related to your version of Go combined with your (outdated) version of Go Convey and some of its dependencies. Perhaps you had some dependencies already in your $GOPATH/src and now you updated to Go version 1.12.*?

    This happened to me when updating from Go version 1.10 to Go version 1.12.6, I've followed the details in here and this helped me fixing my environment: https://github.com/smartystreets/goconvey/issues/561#issuecomment-505525085

    These are the steps I followed:

    • cd $GOPATH/src/github.com/smartystreets/goconvey/ && git checkout master && git pull
      • this should be equivalent to: go get github.com/smartystreets/goconvey
    • cd $GOPATH/src/github.com/smartystreets/assertions/ && git checkout master && git pull
      • this should be equivalent to: go get github.com/smartystreets/assertions
    • go get -u golang.org/x/tools...
    • cd $GOPATH/src/github.com/jtolds/gls/ && git checkout master && git pull
      • this should be equivalent to: go get github.com/jtolds/gls
    评论

报告相同问题?

悬赏问题

  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么