Commit 00469843 by John Chodera (MSKCC)

Updated tests to use URL download.

parent 19e9c1f4
language: c language: c
install: install:
- sudo apt-get update -qq - sudo apt-get update -qq
- sudo apt-get install -qq python-dev python-pip python-yaml g++ - sudo apt-get install -qq python-dev python-pip python-yaml g++ ftp
- sudo pip install conda - sudo pip install conda
- sudo conda init - sudo conda init
- conda config --add channels http://conda.binstar.org/omnia - conda config --add channels http://conda.binstar.org/omnia
......
...@@ -4,16 +4,21 @@ from pdbfixer.pdbfixer import * ...@@ -4,16 +4,21 @@ from pdbfixer.pdbfixer import *
import os import os
import sys import sys
# These are tough PDB codes from http://www.umass.edu/microbio/chime/pe_beta/pe/protexpl/badpdbs.htm def test_build():
pdbcodes = ['1AS5', '1CBN', '1DPO', '1IGY', '1HAG', '1IAO', '4CPA', '1QCQ'] # These are tough PDB codes from http://www.umass.edu/microbio/chime/pe_beta/pe/protexpl/badpdbs.htm
pdbcodes = ['1AS5', '1CBN', '1DPO', '1IGY', '1HAG', '1IAO', '4CPA', '1QCQ']
pdbcodes = ['1VII'] # DEBUG
# Set up PDB retrieval. # Set up PDB retrieval.
pdblist = PDBList() pdblist = PDBList(server=PDBList.alternative_download_url)
for pdbcode in pdbcodes: success = True
for pdbcode in pdbcodes:
try: try:
input_pdb_filename = pdblist.retrieve_pdb_file(pdbcode, pdir='.') input_pdb_filename = pdblist.retrieve_pdb_file(pdbcode, pdir='.')
except: except Exception as e:
print str(e)
print "Could not download PDB code '%s'" % pdbcode print "Could not download PDB code '%s'" % pdbcode
continue continue
...@@ -51,10 +56,9 @@ for pdbcode in pdbcodes: ...@@ -51,10 +56,9 @@ for pdbcode in pdbcodes:
except Exception as e: except Exception as e:
print str(e) print str(e)
sys.exit(1) success = False
# Signal success. if not success:
sys.exit(0) raise Exception("build test failed on one or more PDB files.")
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