File: exclude_online_tests.patch

package info (click to toggle)
python-csb 1.2.3%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,708 kB
  • ctags: 4,889
  • sloc: python: 24,180; xml: 812; makefile: 23; sh: 6
file content (51 lines) | stat: -rw-r--r-- 1,681 bytes parent folder | download | duplicates (5)
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
Author: Andreas Tille <tille@debian.org>
Last-Update: Sat, 26 Dec 2015 08:01:36 +0100
Bug-Debian: https://bugs.debian.org/738962
Description: Exclude tests requiring online access

--- a/csb/test/cases/bio/io/wwpdb/__init__.py
+++ b/csb/test/cases/bio/io/wwpdb/__init__.py
@@ -503,43 +503,6 @@ class TestCustomProvider(test.Case):
         self.assertTrue(isinstance(s, Structure))
         self.assertRaises(StructureNotFoundError, self.provider.get, '$')
         
-@test.unit
-class TestRemoteProvider(test.Case):
-    
-    def setUp(self):
-        
-        super(TestRemoteProvider, self).setUp()
-        self.provider = RemoteStructureProvider()
-        
-    def testGet(self):
-        
-        s = self.provider.get('3p1u')
-        self.assertEqual(s.accession, '3p1u')
-        self.assertTrue(isinstance(s, Structure))
-        
-        self.provider.prefix = 'http://www.google.com/NotExisting'
-        self.assertRaises(StructureNotFoundError, self.provider.get, 'NoSuchFile')    
-                
-
-@test.functional
-class TestGet(test.Case):
-    
-    def runTest(self):
-        
-        structure = get('1d3z')
-        self.assertEqual(structure.accession, '1d3z')
-        
-        # Chain level
-        self.assertEqual(structure.chains.length, 1)
-        self.assertEqual(len(structure.chains), 1)
-
-        self.assertEqual(len(structure.chains['A']), 76)
-        self.assertEqual(len(structure['A']), 76)
-
-        # Residue level 
-        self.assertEqual(len(structure['A'][1:10]), 9)
-        self.assertEqual(structure['A'][0].type,SequenceAlphabets.Protein.MET)                      
-
 
 @test.functional
 class TestFind(test.Case):