-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Increase from 60% to 61% test coverage ;) #48
- dry-run as part of add bib - test_biblio to tests specific Biblio methods (here __eq__) - papers uninstall in teaddown => needed to fix one test with --relative-path !
- Loading branch information
perrette
committed
Apr 25, 2023
1 parent
e65a404
commit bc9b06b
Showing
4 changed files
with
50 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import os | ||
import unittest | ||
import tempfile | ||
from papers.bib import Biblio | ||
from tests.common import prepare_paper | ||
|
||
class TestBiblio(unittest.TestCase): | ||
|
||
def setUp(self): | ||
self.mybib = tempfile.mktemp(prefix='papers.bib') | ||
# self.somebib = tempfile.mktemp(prefix='papers.somebib.bib') | ||
self.pdf, self.doi, self.key, self.newkey, self.year, self.bibtex, self.file_rename = prepare_paper() | ||
open(self.mybib,'w').write(self.bibtex) | ||
self.biblio = Biblio.load(self.mybib, '') | ||
|
||
def test_bib_equal(self): | ||
self.assertTrue(self.biblio == self.biblio) | ||
|
||
def tearDown(self): | ||
os.remove(self.mybib) | ||
# os.remove(self.somebib) |
Empty file.