def test_identify_ibids_simple(self): ref_line = u"""[46] E. Schrodinger, Sitzungsber. Preuss. Akad. Wiss. Phys. Math. Kl. 24, 418(1930); ibid, 3, 1(1931)""" r = identify_ibids(ref_line.upper()) self.assertEqual(r, ({ 85: u'IBID' }, u'[46] E. SCHRODINGER, SITZUNGSBER. PREUSS. AKAD. WISS. PHYS. MATH. KL. 24, 418(1930); ____, 3, 1(1931)' ))
def test_identify_ibids_empty(self): r = identify_ibids("") self.assertEqual(r, ({}, ''))
def test_identify_ibids_simple(self): ref_line = u"""[46] E. Schrodinger, Sitzungsber. Preuss. Akad. Wiss. Phys. Math. Kl. 24, 418(1930); ibid, 3, 1(1931)""" r = identify_ibids(ref_line.upper()) self.assertEqual(r, ({85: u'IBID'}, u'[46] E. SCHRODINGER, SITZUNGSBER. PREUSS. AKAD. WISS. PHYS. MATH. KL. 24, 418(1930); ____, 3, 1(1931)'))
def test_identify_ibids_empty(self): from invenio.refextract_tag import identify_ibids r = identify_ibids("") self.assertEqual(r, ({}, {}, ''))