Menu

#43 Fix tests with Python 3

closed
None
5
2012-10-23
2011-08-27
No
  • Fix TabError: inconsistent use of tabs and spaces in indentation
  • Fix string exception (SyntaxError: invalid syntax)
  • Fix encoding/decoding of strings for buffered pipes in Popen (TypeError: Type str doesn't support the buffer API)

Some PyBel tests are outdated and one pytest_sym test fails:
55: Test command: /usr/bin/cmake "-P" "/home/reinis/Hack/OpenBabel/build_trunk/test/pytest_sym.cmake"
55: Test timeout computed to be: 1500
55: NOTFOUND
55: .....F..................
55: ======================================================================
55: FAIL: testXYZtoSMILESand3DMDL (main.TestConversions)
55: Test conversion from XYZ to SMILES and 3D MDL
55: ----------------------------------------------------------------------
55: Traceback (most recent call last):
55: File "/home/reinis/Hack/OpenBabel/openbabel/openbabel/trunk/test/testsym.py", line 248, in testXYZtoSMILESand3DMDL
55: self.assertEqual(canoutput.rstrip(), can)
55: AssertionError: 'I[CH][C]1CN1' != 'I/C=C/1\CN1'
55:
55: ----------------------------------------------------------------------
55: Ran 24 tests in 6.398s
55:
55: FAILED (failures=1)
55:
2/8 Test #55: pytest_sym .......................***Failed Error regular expression found in output. Regex=[FAIL] 6.45 sec

60: Test command: /usr/bin/cmake "-P" "/home/reinis/Hack/OpenBabel/build_trunk/test/pybindtest__pybel.cmake"
60: Test timeout computed to be: 1500
60: /home/reinis/Hack/OpenBabel/build_trunk/scripts/pybuild:/home/reinis/Hack/OpenBabel/build_trunk/lib
60: ........................==============================
60: *** Open Babel Warning in WriteMolecule
60: No 2D or 3D coordinates exist. Any stereochemical information will be lost. To generate 2D or 3D coordinates use --gen2D or --gen3d.
60: ..==============================
60: *** Open Babel Error in ReadMolecule
60: &)(%)($) contained a character '&' which is invalid in SMILES
60: ...==============================
60: *** Open Babel Error in SMARTSError
60: SMARTS Error:
60: [#NOEL][#NOEL]
60: ^
60:
60: ...==============================
60: *** Open Babel Error in ExtractUnitCell
60: CIF ERROR: missing a,b or c value - cannot interpret structure !
60: ==============================
60: *** Open Babel Warning in ExtractSpacegroup
60: CIF ERROR: missing spacegroup description: defaulting to P1...
60: .
60: ----------------------------------------------------------------------
60: Ran 33 tests in 0.593s
60:
60: OK
60:
7/8 Test #60: pybindtest__pybel ................
**Failed Error regular expression found in output. Regex=[ERROR] 0.73 sec

Discussion

  • Reinis Danne

    Reinis Danne - 2011-08-27

    Python test patch against trunk

     
  • Noel O'Boyle

    Noel O'Boyle - 2011-08-30

    Thanks. Applied in r4545.

    I'm following up the test failures separately. One is already fixed.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.