inveniosoftware / invenio

Invenio digital library framework
https://invenio.readthedocs.io
MIT License
625 stars 292 forks source link

BibConvert: failing unit tests #249

Closed tiborsimko closed 10 years ago

tiborsimko commented 10 years ago

Originally on 2010-08-18

The regexp related functionality of BibConvert should be checked and fixed. See failing TDD tests committed in ab0bc65a01b0793cb0123f48c7e12042db9f453d.

badzil commented 10 years ago

Originally on 2010-08-19

One of the unit tests had a problem and one important unit test was missing (showing a misuse of the python module re). I attached a patch to this ticket in order to update the tests.

invenio-developers commented 10 years ago

Originally by Benoit Thiell bthiell@cfa.harvard.edu on 2010-09-15

In [9cbfe0d635ea07f91a24036cf5288ba894c6a53b]:

#CommitTicketReference repository="" revision="9cbfe0d635ea07f91a24036cf5288ba894c6a53b"
BibConvert: fix tests for regular expressions

- Addresses #249.
invenio-developers commented 10 years ago

Originally by tohls on 2010-09-15

Benuit, could you look over the following tests?

This one is correctly asserted: self.assertEqual("sep_", bibconvert.FormatField(testinput, "LIMW[!],R)"))

But this one will fail, would you like to change the regexp in this one? self.assertEqual(test_input, bibconvert.FormatField(testinput, "LIMW[!-],R)"))

tiborsimko commented 10 years ago

Originally on 2010-09-15

Just to elaborate a bit on Tony's comment: it looks like one of the TDD tests that you have introduced in ab0bc65a01b0793cb0123f48c7e12042db9f453d may be broken. (The test_limw_right_regex() one that operates on sep_1999 input.)

invenio-developers commented 10 years ago

Originally by Tony Ohls tony.ohls@cern.ch on 2010-09-17

In [e950c000b8ac20e6ee2222bd9d24900f4a8b9828]:

#CommitTicketReference repository="" revision="e950c000b8ac20e6ee2222bd9d24900f4a8b9828"
BibConvert: fix regexp treatment and unit tests

- Fixed regexp treatment in IF, LIMW, EXP functions.
  (closes #249)

- Corrected one (apparently wrong) unit test.