Bibulous_test.py is a script which runs through the entire Bibulous regression testing suite.
The basic approach of the tests is as follows: (1) Once a change is made to the code (to fix a bug or add functionality), the writer should add an entry to the
/test/test1.bib file, where the “entrytype” gives an indication of what the test is for. For example, the entry in the BIB file may start with
@test_initialize1{...and provide an “author” field where one or more authors have names which the code for generating initials can potentially break is not written carefully. Include a 1-line comment about the purpose of the entry as well.
Test #1 consists of a suite of single tests of options and features that are valid with the default template file.
Test #2 loads a number of large .bib database files to put the BibTeX parser and the BBL file writer through a comprehensive set of conditions. Every entry in the BIB files is written to the output BBL file to test as much of the processing chain as possible.
Rather than checking the output against a target file, this test really just makes sure that no exceptions are emitted when processing the entire database through the full chain of functions.
Test #3 tests that the “authorextract” method functions correctly.
Test #4 checks the operation of generating citation keys.
Test #5 flexes the Python API.
Test #6 makes sure to raise an exception when attempting to load a BibTeX-format BST file.
Test #7 checks the operation of generating reference list labels.
Test #8 tests Bibulous’ ability to generate glossaries, symbol lists, and acronym lists.
Test #9 is a pltform for running conditions in which the entire database needs to be re-read with each test.