Skip to content

silence warnings PDBConstructionWarning in test_PDB_StructureAlignment.py #1877

Closed

Description

@peterjc

Setup

Seen with latest code from git while preparing the 1.73 release on Linux, but applies to all platforms.

Expected behaviour

$ python run_tests.py test_PDB_StructureAlignment.py
Python version: 2.7.15 | packaged by conda-forge | (default, Jul 27 2018, 10:26:36) 
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)]
Operating system: posix linux2
test_PDB_StructureAlignment ... ok
----------------------------------------------------------------------
Ran 1 test in 0.958 seconds

Actual behaviour

$ python run_tests.py test_PDB_StructureAlignment.py
Python version: 2.7.15 | packaged by conda-forge | (default, Jul 27 2018, 10:26:36) 
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)]
Operating system: posix linux2
test_PDB_StructureAlignment ... /tmp/biopython-1.73/build/lib.linux-x86_64-2.7/Bio/PDB/StructureBuilder.py:91: PDBConstructionWarning: WARNING: Chain A is discontinuous at line 13298.
  PDBConstructionWarning)
/tmp/biopython-1.73/build/lib.linux-x86_64-2.7/Bio/PDB/StructureBuilder.py:91: PDBConstructionWarning: WARNING: Chain B is discontinuous at line 13344.
  PDBConstructionWarning)
ok
----------------------------------------------------------------------
Ran 1 test in 0.958 seconds

Steps to reproduce

Use python run_tests.py --offline test_PDB_StructureAlignment.py or similar.

We need to catch and ignore the PDBConstructionWarning here, see for example:

https://github.com/biopython/biopython/blob/biopython-172/Tests/test_PDB.py#L107

i.e. Wrap as few lines as possible in the context manager

Activity

  1. konqr commented on Dec 20, 2018

    @konqr

    Hey. Beginner here. I am on it. :)

  2. konqr commented on Dec 20, 2018

    @konqr

    @peterjc Done. PR added.

  3. konqr commented on Dec 21, 2018

    @konqr

    Hey Peter. Thanks for the email. Sorry for the wrong PR. I understood what you want to be done. I'm on it, thanks.

  4. konqr commented on Dec 21, 2018

    @konqr

    Please check #1881 for PR. Hope this runs well.

  5. added a commit that references this issue on Jan 11, 2026
    d94797c
  6. added a commit that references this issue on Jan 17, 2026
    e6ddb85
  7. added a commit that references this issue on Jan 19, 2026
    7839d16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Testinggood first issueThis should be an easy fix, suitable for beginners

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions