Exemple #1
0
def test_fetch_pdb():
    """Test fetch_pdb"""

    try:
        ppdb = PandasPdb()
        txt = ppdb._fetch_pdb('3eiy')
    except HTTPError:
        pass

    if txt:  # skip if PDB down
        txt[:100] == three_eiy[:100]
        ppdb.fetch_pdb('3eiy')
        assert ppdb.pdb_text == txt
Exemple #2
0
def test_fetch_pdb():
    """Test fetch_pdb"""

    try:
        ppdb = PandasPdb()
        url, txt = ppdb._fetch_pdb('3eiy')
    except HTTPError:
        pass

    if txt:  # skip if PDB down
        txt[:100] == three_eiy[:100]
        ppdb.fetch_pdb('3eiy')
        assert ppdb.pdb_text == txt
        assert ppdb.pdb_path == 'http://www.rcsb.org/pdb/files/3eiy.pdb'
Exemple #3
0
def test_fetch_pdb():
    """Test fetch_pdb"""

    try:
        ppdb = PandasPdb()
        url, txt = ppdb._fetch_pdb('3eiy')
    except HTTPError:
        url, txt = None, None
    except ConnectionResetError:
        url, txt = None, None

    if txt:  # skip if PDB down
        txt[:100] == three_eiy[:100]
        ppdb.fetch_pdb('3eiy')
        assert ppdb.pdb_text == txt
        assert ppdb.pdb_path == 'https://files.rcsb.org/download/3eiy.pdb'