播放:无法解析符号PlaySpecification

时间:2017-09-12 16:50:14

标签: scala playframework-2.0 specs2

我无法导入PlaySpecification。 首先,它似乎是Specs2的一部分,但在导入specs2之后,它并没有显示出来。 https://playframework.com/documentation/2.6.x/ScalaFunctionalTestingWithSpecs2#playspecification

另一方面,它说这是部分或play.api.test,但我也找不到它 https://playframework.com/documentation/2.6.x/api/scala/index.html#play.api.test.PlaySpecification

有没有人可以告诉我如何导入PlaySpecification?

我在build.sbt中尝试了这两种配置,但没有一种能够正常工作:

"org.specs2" %% "specs2-core" % "3.9.5" % "test",
"org.specs2" %% "specs2-mock" % "3.9.5" % "test"

specs2 % Test

1 个答案:

答案 0 :(得分:0)

您需要添加以下依赖项:

vals = np.random.randn(1000)
f = plt.figure(figsize=[4,4])
ax = f.add_subplot(111)
ax.hist(vals, bins=20, normed=True)

之后,如果您使用的是IDE,请刷新项目。