From: Ben Soares Date: Wed, 17 May 2023 13:16:03 +0000 (+0100) Subject: JAL-629 Tidy up tests and replaced methods before merge to develop X-Git-Tag: Release_2_11_3_0~14^2~41 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=b3fb6325a8bc315c5c938faf10ffd2e73d965f16 JAL-629 Tidy up tests and replaced methods before merge to develop --- diff --git a/src/jalview/io/BackupFiles.java b/src/jalview/io/BackupFiles.java index af9df86..bec584f 100644 --- a/src/jalview/io/BackupFiles.java +++ b/src/jalview/io/BackupFiles.java @@ -234,7 +234,7 @@ public class BackupFiles classInit(); if (file.getParentFile() == null) { - // filename probably in pwd represented with no parent -- fix this! + // filename probably in pwd represented with no parent -- fix it before it's a problem file = file.getAbsoluteFile(); } this.file = file; diff --git a/src/jalview/io/StructureFile.java b/src/jalview/io/StructureFile.java index 61b3d1d..6ec0298 100644 --- a/src/jalview/io/StructureFile.java +++ b/src/jalview/io/StructureFile.java @@ -359,54 +359,6 @@ public abstract class StructureFile extends AlignFile } } - @SuppressWarnings({ "unchecked", "rawtypes" }) - private void NOTprocessWithJmolParser(List prot) - throws Exception - { - try - { - - Class cl = Class.forName("jalview.ext.jmol.JmolParser"); - if (cl != null) - { - final Constructor constructor = cl - .getConstructor(new Class[] - { FileParse.class }); - final Object[] args = new Object[] { - new FileParse(getDataName(), dataSourceType) }; - - StructureImportSettings.setShowSeqFeatures(false); - StructureImportSettings.setVisibleChainAnnotation(false); - StructureImportSettings - .setProcessSecondaryStructure(predictSecondaryStructure); - StructureImportSettings - .setExternalSecondaryStructure(externalSecondaryStructure); - StructureImportSettings - .setTemperatureFactorType(temperatureFactorType); - Object jmf = constructor.newInstance(args); - AlignmentI al = new Alignment((SequenceI[]) cl - .getMethod("getSeqsAsArray", new Class[] {}).invoke(jmf)); - cl.getMethod("addAnnotations", new Class[] { AlignmentI.class }) - .invoke(jmf, al); - for (SequenceI sq : al.getSequences()) - { - if (sq.getDatasetSequence() != null) - { - sq.getDatasetSequence().getAllPDBEntries().clear(); - } - else - { - sq.getAllPDBEntries().clear(); - } - } - replaceAndUpdateChains(prot, al, AlignSeq.PEP, false); - } - } catch (ClassNotFoundException q) - { - } - StructureImportSettings.setShowSeqFeatures(true); - } - private void processWithJmolParser(List prot, boolean doXferSettings) throws MalformedURLException, IOException { diff --git a/test/jalview/bin/CommandLineOperations.java b/test/jalview/bin/CommandLineOperations.java index 0ab18d9..0486744 100644 --- a/test/jalview/bin/CommandLineOperations.java +++ b/test/jalview/bin/CommandLineOperations.java @@ -53,7 +53,7 @@ public class CommandLineOperations } // Note longer timeout needed on full test run than on individual tests - private static final int TEST_TIMEOUT = 23000; + private static final int TEST_TIMEOUT = 15000; private static final int SETUP_TIMEOUT = 9500; diff --git a/test/jalview/io/BackupFilesTest.java b/test/jalview/io/BackupFilesTest.java index 01a9ab0..7f04749 100644 --- a/test/jalview/io/BackupFilesTest.java +++ b/test/jalview/io/BackupFilesTest.java @@ -34,7 +34,6 @@ 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; @@ -45,7 +44,6 @@ import jalview.datamodel.SequenceI; import jalview.gui.AlignFrame; import jalview.gui.JvOptionPane; -@Test(singleThreaded = true) public class BackupFilesTest { @BeforeClass(alwaysRun = true) @@ -329,7 +327,6 @@ 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() { @@ -345,7 +342,6 @@ public class BackupFilesTest newfile.delete(); } File[] tmpFiles = getBackupFiles(file, mysuffix, mydigits); - boolean a = true; for (int i = 0; i < tmpFiles.length; i++) { if (actuallyDeleteTmpFiles) diff --git a/test/jalview/renderer/seqfeatures/FeatureRendererTest.java b/test/jalview/renderer/seqfeatures/FeatureRendererTest.java index f7d8be5..944f147 100644 --- a/test/jalview/renderer/seqfeatures/FeatureRendererTest.java +++ b/test/jalview/renderer/seqfeatures/FeatureRendererTest.java @@ -625,7 +625,7 @@ public class FeatureRendererTest { Jalview.main( new String[] - { "-nonews", "--props", "test/jalview/testProps.jvprops" }); + { "-nonews", "-props", "test/jalview/testProps.jvprops" }); // codons for MCWHSE String cdsSeq = ">cds\nATGtgtTGGcacTCAgaa";