Example #1
0
    def test_construct(self):
        """
        Test whether an exception is raised when a database object is created
        from a bibtex file.
        """

        testee(path.join(path.dirname(path.realpath(__file__)),
               'data/bibliography.bib'))
Example #2
0
    def test_construct(self):
        """
        Test whether an exception is raised when a database object is created
        from a bibtex file.
        """

        testee(
            path.join(path.dirname(path.realpath(__file__)),
                      'data/bibliography.bib'))
Example #3
0
    def test_entry(self):
        """
        Test whether an entry is successfully retrieved from the database.
        """

        db = testee(path.join(path.dirname(path.realpath(__file__)),
                    'data/bibliography.bib'))
        entry = db['lienhard2015']
        self.assertEqual(entry['author'],
                         'J.H. Lienhard IV and J.H. Lienhard V')
        self.assertEqual(entry['title'],
                         'A Heat Transfer Textbook')
Example #4
0
    def test_entry(self):
        """
        Test whether an entry is successfully retrieved from the database.
        """

        db = testee(
            path.join(path.dirname(path.realpath(__file__)),
                      'data/bibliography.bib'))
        entry = db['lienhard2015']
        self.assertEqual(entry['author'],
                         'J.H. Lienhard IV and J.H. Lienhard V')
        self.assertEqual(entry['title'], 'A Heat Transfer Textbook')