File: skip_network_related_tests

package info (click to toggle)
biojava4-live 4.2.12%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 107,344 kB
  • sloc: java: 246,196; xml: 27,590; sh: 95; makefile: 86; python: 64
file content (189 lines) | stat: -rw-r--r-- 7,737 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
Subject: remove tests needing network
Description: debian builds expects to run with no network
Author: Olivier Sallou <osallou@debian.org>
Last-Updated: 2016-12-09
Forwarded: no
--- a/biojava-core/src/test/java/org/biojava/nbio/core/sequence/io/GenbankCookbookTest.java
+++ b/biojava-core/src/test/java/org/biojava/nbio/core/sequence/io/GenbankCookbookTest.java
@@ -67,21 +67,6 @@
 	@Test
 	public void testProcess() throws Throwable {
 		/*
-		 * Method 1: With the GenbankProxySequenceReader
-		 */
-		//Try with the GenbankProxySequenceReader
-		GenbankProxySequenceReader<AminoAcidCompound> genbankProteinReader
-				= new GenbankProxySequenceReader<AminoAcidCompound>(System.getProperty("java.io.tmpdir"), "NP_000257", AminoAcidCompoundSet.getAminoAcidCompoundSet());
-		ProteinSequence proteinSequence = new ProteinSequence(genbankProteinReader);
-		genbankProteinReader.getHeaderParser().parseHeader(genbankProteinReader.getHeader(), proteinSequence);
-		logger.info("Sequence({},{}) = {}...", proteinSequence.getAccession(), proteinSequence.getLength(), proteinSequence.getSequenceAsString().substring(0, 10));
-
-	GenbankProxySequenceReader<NucleotideCompound> genbankDNAReader
-	= new GenbankProxySequenceReader<NucleotideCompound>(System.getProperty("java.io.tmpdir"), "NM_001126", DNACompoundSet.getDNACompoundSet());
-	DNASequence dnaSequence = new DNASequence(genbankDNAReader);
-	genbankDNAReader.getHeaderParser().parseHeader(genbankDNAReader.getHeader(), dnaSequence);
-	logger.info("Sequence({},{}) = {}...", dnaSequence.getAccession(), dnaSequence.getLength(), dnaSequence.getSequenceAsString().substring(0, 10));
-		/*
 		 * Method 2: With the GenbankReaderHelper
 		 */
 		//Try with the GenbankReaderHelper
--- a/biojava-protein-disorder/src/test/java/org/biojava/nbio/ronn/NonstandardProteinCompoundTest.java
+++ b/biojava-protein-disorder/src/test/java/org/biojava/nbio/ronn/NonstandardProteinCompoundTest.java
@@ -67,20 +67,6 @@
 
 	private void testUniprot(String uniprotID) throws CompoundNotFoundException, IOException {
 
-		ProteinSequence seq = getUniprot(uniprotID);
-
-		AminoAcidCompoundSet compoundSet = AminoAcidCompoundSet.getAminoAcidCompoundSet();
-
-/*		for (AminoAcidCompound compound : seq) {
-			System.out.println(compound.getShortName() + " " + compound.getLongName() + " " + compound.getDescription() + " | " + compoundSet.getEquivalentCompounds(compound) + " " + compound.getMolecularWeight() + " " + compound.getBase());
-		}
-		*/
-		assertTrue(compoundSet.isValidSequence(seq));
-
-
-
-		Jronn.getDisorderScores(seq);
-
 
 	}
 
--- a/biojava-core/src/test/java/org/biojava/nbio/core/sequence/loader/GenbankProxySequenceReaderTest.java
+++ b/biojava-core/src/test/java/org/biojava/nbio/core/sequence/loader/GenbankProxySequenceReaderTest.java
@@ -75,90 +75,11 @@
 
 	@Test
 	public void testFeatures() throws IOException, InterruptedException, CompoundNotFoundException {
-		logger.info("run test for protein: {}", gi);
-		GenbankProxySequenceReader<AminoAcidCompound> genbankReader
-				= new GenbankProxySequenceReader<AminoAcidCompound>(System.getProperty("java.io.tmpdir"),
-						this.gi,
-						AminoAcidCompoundSet.getAminoAcidCompoundSet());
 
-		// why only tests on protein sequences?
-		ProteinSequence seq = new ProteinSequence(genbankReader);
-
-		Assert.assertNotNull("protein sequence is null", seq);
-
-		/*
-		 parse description from header. There is no separate interface/abstract class for method getHeader()
-		 so it should be done here (manualy).
-		 */
-		genbankReader.getHeaderParser().parseHeader(genbankReader.getHeader(), seq);
-
-		// test description
-		Assert.assertTrue(seq.getDescription() != null);
-
-		// test accession Id
-		logger.info("accession id: {}", seq.getAccession().getID());
-		Assert.assertNotNull(seq.getAccession().getID());
-		// test GID number
-		if( seq.getAccession().getIdentifier() != null) { // GI: in header now optional. See #596
-			Assert.assertEquals(gi, seq.getAccession().getIdentifier());
-			logger.info("found identifier '{}'", seq.getAccession().getIdentifier());
-		}
-		// test taxonomy id
-		logger.info("taxonomy id: {}", seq.getTaxonomy().getID());
-		Assert.assertNotNull(seq.getTaxonomy().getID());
-		Assert.assertNotNull(Integer.decode(seq.getTaxonomy().getID().split(":")[1]));
-
-		// test taxonomy name
-		String taxonName = seq.getFeaturesByType("source").get(0).getQualifiers().get("organism").get(0).getValue();
-		logger.info("taxonomy name '{}'", taxonName);
-		Assert.assertNotNull(taxonName);
-
-		if (seq.getFeaturesByType("CDS").size() > 0) {
-			FeatureInterface<AbstractSequence<AminoAcidCompound>, AminoAcidCompound> CDS = seq.getFeaturesByType("CDS").get(0);
-			logger.info("CDS: {}", CDS);
-			String codedBy = CDS.getQualifiers().get("coded_by").get(0).getValue();
-			Assert.assertNotNull(codedBy);
-			Assert.assertTrue(!codedBy.isEmpty());
-			logger.info("\t\tcoded_by: {}", codedBy);
-		}
 	}
 
 	@Test
 	public void testProteinSequenceFactoring() throws Exception {
-		logger.info("create protein sequence test for target {}", gi);
-
-		GenbankProxySequenceReader<AminoAcidCompound> genbankReader
-				= new GenbankProxySequenceReader<AminoAcidCompound>(System.getProperty("java.io.tmpdir"),
-						this.gi,
-						AminoAcidCompoundSet.getAminoAcidCompoundSet());
-
-		ProteinSequence seq = new ProteinSequence(genbankReader);
-
-		// if target protein contain CDS/coded_by than it should contain parent nucleotide seq
-		ArrayList<AbstractFeature> CDSs = genbankReader.getFeatures().get("CDS");
-
-		if (CDSs != null) {
-			if (CDSs.size() == 1) {
-				ArrayList<Qualifier> qualifiers = (ArrayList)CDSs.get(0).getQualifiers().get("coded_by");
-				Qualifier codedBy = qualifiers.get(0);
-				if (codedBy != null) {
-
-					AbstractSequence<?> parentSeq = seq.getParentSequence();
-					Assert.assertNotNull(parentSeq);
-
-					/*
-					 Sometimes protein might have many 'parents' with different accessions
-					 so accession is not set.
-
-					 That test is always failed
-					 */
-					//Assert.assertTrue(parentSeq.getAccession());
-					Assert.assertTrue(!parentSeq.getSequenceAsString().isEmpty());
-				}
-			}
-		} else {
-			logger.info("target {} has no CDS", gi);
-		}
 
 	}
 }
--- a/biojava-core/src/test/java/org/biojava/nbio/core/search/io/SearchIOTest.java
+++ b/biojava-core/src/test/java/org/biojava/nbio/core/search/io/SearchIOTest.java
@@ -27,6 +27,7 @@
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 import static org.junit.Assert.*;
 
@@ -78,6 +79,7 @@
 	/**
 	 * Constructor test specifying Factory
 	 */
+        @Ignore("Attemps to use the network")
 	@Test
 	public void testConstructorWithoutFactoryGuess() {
 		String resource = "/org/biojava/nbio/core/search/io/blast/testBlastReport.blastxml";
@@ -95,6 +97,7 @@
 	/**
 	 * Constructor test specifying Factory and using a evalue threshold filter
 	 */
+        @Ignore("Attemps to use the network")
 	@Test
 	public void testConstructorWithEvalueHspFilter() {
 		//
--- a/biojava-core/src/test/java/org/biojava/nbio/core/search/io/blast/BlastXMLParserTest.java
+++ b/biojava-core/src/test/java/org/biojava/nbio/core/search/io/blast/BlastXMLParserTest.java
@@ -31,6 +31,7 @@
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 import static org.junit.Assert.*;
 import org.junit.Ignore;
@@ -84,6 +85,7 @@
 	/**
 	 * Test of createObjects method, of class BlastXMLParser.
 	 */
+        @Ignore("Attempts to use the network")
 	@Test
 	public void testCreateObjects() throws Exception {
 		System.out.println("createObjects");