-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from mcmtroffaes/feature/fix-memory-leak
Fix memory leak (see issue #102).
- Loading branch information
Showing
5 changed files
with
62 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
extensions = ['sphinxcontrib.bibtex'] | ||
exclude_patterns = ['_build'] |
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,3 @@ | ||
:cite:`2001:zaffalon` | ||
|
||
.. bibliography:: test.bib |
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 @@ | ||
@INCOLLECTION{2001:zaffalon, | ||
AUTHOR = {Zaffalon, Marco}, | ||
TITLE = {Statistical inference of the naive credal | ||
classifier}, | ||
PAGES = {384--393}, | ||
CROSSREF = {2001:ISIPTA} | ||
} | ||
|
||
% need booktitle for crossrefs | ||
@PROCEEDINGS{2001:ISIPTA, | ||
TITLE = {{ISIPTA} '01 -- Proceedings of the Second | ||
International Symposium on Imprecise Probabilities | ||
and Their Applications}, | ||
BOOKTITLE = {{ISIPTA} '01 -- Proceedings of the Second | ||
International Symposium on Imprecise Probabilities | ||
and Their Applications}, | ||
YEAR = {2001}, | ||
PUBLISHER = {Shaker Publishing}, | ||
EDITOR = {{de} Cooman, G. and Fine, T. L. and Seidenfeld, T.}, | ||
ADDRESS = {Maastricht} | ||
} |
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,31 @@ | ||
""" | ||
test_crossref | ||
~~~~~~~~~~~~~ | ||
Test that cross references work. | ||
""" | ||
|
||
import os.path | ||
import re | ||
|
||
from sphinx_testing.util import path, with_app | ||
|
||
srcdir = path(__file__).dirname().joinpath('crossref').abspath() | ||
|
||
|
||
def teardown_module(): | ||
(srcdir / '_build').rmtree(True) | ||
|
||
|
||
@with_app(srcdir=srcdir, warningiserror=True) | ||
def test_crossref(app, status, warning): | ||
app.builder.build_all() | ||
# default style is plain; check output | ||
with open(os.path.join(app.outdir, "contents.html")) as stream: | ||
output = stream.read() | ||
# ensure Zaf is cited | ||
assert len(re.findall('\\[Zaf\\]', output)) == 2 | ||
# ensure proceedings only mentioned for Zaf | ||
assert len(re.findall( | ||
'Proceedings of the Second International Symposium ' | ||
'on Imprecise Probabilities and Their Applications', output)) == 1 |