Commit 23e05373 authored by Peter van 't Hof's avatar Peter van 't Hof

Fixed tests

parent 25f487cc
......@@ -129,7 +129,7 @@ class ShivaSvCallingTest extends TestNGSuite with Matchers {
)
val pipeline = initPipeline(map)
pipeline.inputBams = Map("bam" -> ShivaVariantcallingTest.inputTouch("bam" + ".bam"))
pipeline.inputBams = Map("bam" -> ShivaSvCallingTest.inputTouch("bam" + ".bam"))
if (!del && !dup && !inv && !tra) intercept[IllegalArgumentException] {
pipeline.init()
......@@ -149,7 +149,7 @@ class ShivaSvCallingTest extends TestNGSuite with Matchers {
val map = Map("sv_callers" -> List("this is not a caller"))
val pipeline = initPipeline(map)
pipeline.inputBams = Map("bam" -> ShivaVariantcallingTest.inputTouch("bam" + ".bam"))
pipeline.inputBams = Map("bam" -> ShivaSvCallingTest.inputTouch("bam" + ".bam"))
intercept[IllegalArgumentException] {
pipeline.init()
......@@ -181,7 +181,7 @@ object ShivaSvCallingTest {
val outputDir = Files.createTempDir()
outputDir.deleteOnExit()
new File(outputDir, "input").mkdirs()
def inputTouch(name: String): File = {
private def inputTouch(name: String): File = {
val file = new File(outputDir, "input" + File.separator + name).getAbsoluteFile
Files.touch(file)
file
......
......@@ -96,16 +96,13 @@ class ShivaVariantcallingTest extends TestNGSuite with Matchers {
pipeline.functions.count(_.isInstanceOf[VcfFilter]) shouldBe (if (raw) bams else 0)
}
}
@AfterClass def removeTempOutputDir() = {
FileUtils.deleteDirectory(ShivaVariantcallingTest.outputDir)
}
}
object ShivaVariantcallingTest {
val outputDir = Files.createTempDir()
outputDir.deleteOnExit()
new File(outputDir, "input").mkdirs()
def inputTouch(name: String): File = {
private def inputTouch(name: String): File = {
val file = new File(outputDir, "input" + File.separator + name).getAbsoluteFile
Files.touch(file)
file
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment