JAL-629 added eps and imagemap. Added --output and --format with test. Adjusted...
[jalview.git] / test / jalview / io / BackupFilesTest.java
index a356621..01a9ab0 100644 (file)
@@ -34,6 +34,7 @@ import java.util.TreeMap;
 
 import org.testng.Assert;
 import org.testng.annotations.AfterClass;
+import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
@@ -44,6 +45,7 @@ import jalview.datamodel.SequenceI;
 import jalview.gui.AlignFrame;
 import jalview.gui.JvOptionPane;
 
+@Test(singleThreaded = true)
 public class BackupFilesTest
 {
   @BeforeClass(alwaysRun = true)
@@ -104,7 +106,8 @@ public class BackupFilesTest
 
     // check no backup files
     File[] backupFiles = getBackupFiles();
-    Assert.assertTrue(backupFiles.length == 0);
+    Assert.assertEquals(backupFiles.length, 0, "Number of backup files is "
+            + backupFiles.length + ", not " + 0);
   }
 
   // save with no numbers in the backup file names
@@ -326,6 +329,7 @@ public class BackupFilesTest
   }
 
   // this deletes the newFile (if it exists) and any saved backup file for it
+  @AfterTest(alwaysRun = true)
   @AfterClass(alwaysRun = true)
   private void cleanupTmpFiles()
   {
@@ -341,6 +345,7 @@ public class BackupFilesTest
       newfile.delete();
     }
     File[] tmpFiles = getBackupFiles(file, mysuffix, mydigits);
+    boolean a = true;
     for (int i = 0; i < tmpFiles.length; i++)
     {
       if (actuallyDeleteTmpFiles)