Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_fragmenter babel_PC_with_RO_depth fails #3078

Closed
drew-parsons opened this issue Jun 18, 2023 · 1 comment · Fixed by #3093
Closed

test_fragmenter babel_PC_with_RO_depth fails #3078

drew-parsons opened this issue Jun 18, 2023 · 1 comment · Fixed by #3093
Labels
analysis Concerning pymatgen.analysis tests Issues with or changes to the pymatgen test suite

Comments

@drew-parsons
Copy link
Contributor

Description

Testing pymatgen 2023.05.31 on debian unstable, all tests pass except
test_babel_PC_with_RO_depth_0_vs_depth_10 from analysis/tests/test_fragmenter.py

Repro

Steps to reproduce the behavior:

  1. Build from source, including pymatgen test-files
  2. pytest-3 -vv pymatgen/analysis/tests/test_fragmenter.py -k RO_depth
  3. See error

Short error:

_________________________________________________________________________ TestFragmentMolecule.test_babel_PC_with_RO_depth_0_vs_depth_10 __________________________________________________________________________

self = <test_fragmenter.TestFragmentMolecule testMethod=test_babel_PC_with_RO_depth_0_vs_depth_10>

    def test_babel_PC_with_RO_depth_0_vs_depth_10(self):
        pytest.importorskip("openbabel", reason="OpenBabel not installed")
        fragmenter0 = Fragmenter(molecule=self.pc, depth=0, open_rings=True, opt_steps=1000)
>       assert fragmenter0.total_unique_fragments == 509
E       assert 411 == 509
E        +  where 411 = <pymatgen.analysis.fragmenter.Fragmenter object at 0x7f6e6e87bed0>.total_unique_fragments

test_fragmenter.py:118: AssertionError

Long error log:

/projects/pymatgen/pymatgen/analysis/tests$ PMG_TEST_FILES_DIR=/usr/share/doc/pymatgen-test-files/examples/test_files PYTHONPATH=/projects/pymatgen/.pybuild/cpython3_3.11_pymatgen/build/ pytest-3 -vv test_fragmenter.py -k RO_depth 
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.11.4, pytest-7.3.2, pluggy-1.0.0+repack -- /usr/bin/python3
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/projects/pymatgen/pymatgen/analysis/tests/.hypothesis/examples')
rootdir: /projects/pymatgen
configfile: pyproject.toml
plugins: xvfb-2.0.0, remotedata-0.4.0, asyncio-0.20.3, arraydiff-0.5.0, filter-subpackage-0.1.2, flaky-3.7.0, cov-4.0.0, mpi-0.6, astropy-header-0.2.2, openfiles-0.5.0, hypothesis-6.73.0, mock-3.8.2, doctestplus-0.12.1, astropy-0.10.0
asyncio: mode=Mode.STRICT
collected 11 items / 10 deselected / 1 selected                                                                                                                                                                   

test_fragmenter.py::TestFragmentMolecule::test_babel_PC_with_RO_depth_0_vs_depth_10 FAILED                                                                                                                  [100%]

==================================================================================================== FAILURES =====================================================================================================
_________________________________________________________________________ TestFragmentMolecule.test_babel_PC_with_RO_depth_0_vs_depth_10 __________________________________________________________________________

self = <test_fragmenter.TestFragmentMolecule testMethod=test_babel_PC_with_RO_depth_0_vs_depth_10>

    def test_babel_PC_with_RO_depth_0_vs_depth_10(self):
        pytest.importorskip("openbabel", reason="OpenBabel not installed")
        fragmenter0 = Fragmenter(molecule=self.pc, depth=0, open_rings=True, opt_steps=1000)
>       assert fragmenter0.total_unique_fragments == 509
E       assert 411 == 509
E        +  where 411 = <pymatgen.analysis.fragmenter.Fragmenter object at 0x7f6e6e87bed0>.total_unique_fragments

test_fragmenter.py:118: AssertionError
---------------------------------------------------------------------------------------------- Captured stderr call -----------------------------------------------------------------------------------------------
==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

==============================
*** Open Babel Warning  in PerceiveBondOrders
  Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders

============================================================================================== slowest 30 durations ===============================================================================================
10.02s call     pymatgen/analysis/tests/test_fragmenter.py::TestFragmentMolecule::test_babel_PC_with_RO_depth_0_vs_depth_10

(2 durations < 0.005s hidden.  Use -vv to show these durations.)
======================================================================================== 1 failed, 10 deselected in 13.08s ========================================================================================

Expected behavior

The test should pass.

Environment

  • OS: Linux (debian unstable)
  • pymatgen 2023.05.31
  • openbabel 3.1.1
@janosh janosh added tests Issues with or changes to the pymatgen test suite analysis Concerning pymatgen.analysis labels Jun 22, 2023
@janosh
Copy link
Member

janosh commented Jun 22, 2023

I'm having trouble installing openbabel on Mac so can't run this test myself. Is this value correct?

assert fragmenter10.total_unique_fragments == 509

I'm concerned these tests are apparently being skipped in CI. I was under the impression openbabel is installed in our Linux CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analysis Concerning pymatgen.analysis tests Issues with or changes to the pymatgen test suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants