Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
biopet.biopet
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
biopet.biopet
Commits
645895a0
Commit
645895a0
authored
9 years ago
by
Peter van 't Hof
Browse files
Options
Downloads
Patches
Plain Diff
Add test addSummarizable
parent
5fe478bc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/summary/SummaryQScriptTest.scala
+26
-6
26 additions, 6 deletions
...nl/lumc/sasc/biopet/core/summary/SummaryQScriptTest.scala
with
26 additions
and
6 deletions
public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/summary/SummaryQScriptTest.scala
+
26
−
6
View file @
645895a0
...
...
@@ -17,7 +17,7 @@ class SummaryQScriptTest extends TestNGSuite with Matchers {
@Test
def
testNoJobs
:
Unit
=
{
SummaryQScript
.
md5sumCache
.
clear
()
val
script
=
make
()
val
script
=
make
Qscript
()
script
.
addSummaryJobs
()
SummaryQScript
.
md5sumCache
shouldBe
empty
}
...
...
@@ -26,7 +26,7 @@ class SummaryQScriptTest extends TestNGSuite with Matchers {
def
testFiles
:
Unit
=
{
SummaryQScript
.
md5sumCache
.
clear
()
val
file
=
new
File
(
s
".${File.separator}bla"
)
val
script
=
make
(
files
=
Map
(
"file"
->
file
))
val
script
=
make
Qscript
(
files
=
Map
(
"file"
->
file
))
script
.
addSummaryJobs
()
SummaryQScript
.
md5sumCache
should
not
be
empty
SummaryQScript
.
md5sumCache
.
toMap
shouldBe
Map
(
...
...
@@ -38,7 +38,7 @@ class SummaryQScriptTest extends TestNGSuite with Matchers {
def
testDuplicateFiles
:
Unit
=
{
SummaryQScript
.
md5sumCache
.
clear
()
val
file
=
new
File
(
s
".${File.separator}bla"
)
val
script
=
make
(
files
=
Map
(
"file"
->
file
,
"file2"
->
file
))
val
script
=
make
Qscript
(
files
=
Map
(
"file"
->
file
,
"file2"
->
file
))
script
.
addSummaryJobs
()
SummaryQScript
.
md5sumCache
should
not
be
empty
SummaryQScript
.
md5sumCache
.
toMap
shouldBe
Map
(
...
...
@@ -46,12 +46,27 @@ class SummaryQScriptTest extends TestNGSuite with Matchers {
script
.
functions
.
size
shouldBe
2
}
@Test
def
testAddSummarizable
:
Unit
=
{
SummaryQScript
.
md5sumCache
.
clear
()
val
file
=
new
File
(
s
".${File.separator}bla"
)
val
script
=
makeQscript
()
script
.
addSummarizable
(
makeSummarizable
(
files
=
Map
(
"file"
->
file
,
"file2"
->
file
)),
"test"
)
script
.
summarizables
.
size
shouldBe
1
script
.
addSummaryJobs
()
SummaryQScript
.
md5sumCache
should
not
be
empty
SummaryQScript
.
md5sumCache
.
toMap
shouldBe
Map
(
new
File
(
s
".${File.separator}bla"
)
->
new
File
(
s
".${File.separator}bla.md5"
))
script
.
functions
.
size
shouldBe
2
}
}
object
SummaryQScriptTest
{
def
make
(
settings
:
Map
[
String
,
Any
]
=
Map
(),
files
:
Map
[
String
,
File
]
=
Map
(),
c
:
Map
[
String
,
Any
]
=
Map
())
=
def
make
Qscript
(
settings
:
Map
[
String
,
Any
]
=
Map
(),
files
:
Map
[
String
,
File
]
=
Map
(),
c
:
Map
[
String
,
Any
]
=
Map
())
=
new
SummaryQScript
with
QScript
{
outputDir
=
new
File
(
"."
)
override
def
globalConfig
=
new
Config
(
c
)
...
...
@@ -64,4 +79,9 @@ object SummaryQScriptTest {
def
biopetScript
()
:
Unit
=
???
def
root
:
Configurable
=
null
}
def
makeSummarizable
(
files
:
Map
[
String
,
File
]
=
Map
(),
stats
:
Map
[
String
,
Any
]
=
Map
())
=
new
Summarizable
{
def
summaryFiles
:
Map
[
String
,
File
]
=
files
def
summaryStats
:
Any
=
stats
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment