One function

getnames in sciunto-org/python-bibtexparser

The author described this change as getname: fix broken test. It counts as a record because the check below fails on the code as it stood at e3492cc16 and passes on 09289d77e, with nothing else changed between the two runs.

Fix saved2013-09-29
Sharing licenceMIT · LICENSE
Change size+2 2

What the code was meant to do, written into the code itself as a docstring

Make people names as surname, firstnames or surname, initials. Should eventually combine up the two. :param names: a list of names :type names: list :returns: list -- Correctly formated names

The change

1414 if ',' in namestring:
1515 namesplit = namestring.split(',', 1)
1616 last = namesplit[0].strip()
17- firsts = [i.strip().strip('.') for i in namesplit[1].split()]
17+ firsts = [i.strip() for i in namesplit[1].split()]
1818 else:
1919 namesplit = namestring.split()
2020 last = namesplit.pop()
21- firsts = [i.replace('.', ' ').strip() for i in namesplit]
21+ firsts = [i.replace('.', '. ').strip() for i in namesplit]
2222 if last in ['jnr', 'jr', 'junior']:
2323 last = firsts.pop()
2424 for item in firsts:

The check that tells the two apart

failpass·bibtexparser/tests/test_bibtexparser.py::TestBibtexParserList::test_book_cust

Check file bibtexparser/tests/test_bibtexparser.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before ite3492cc16e1a50a450e40c102c44dea739d11fd8
Broken version dated2013-09-29
Modulebibtexparser.customization
Units changedgetnames
Fingerprint847cca6f5894a59e
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in sciunto-org/python-bibtexparser