Skip to content

Commit

Permalink
test long citation
Browse files Browse the repository at this point in the history
  • Loading branch information
Shyam D committed Jul 2, 2021
1 parent cefa825 commit 40474b8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
14 changes: 14 additions & 0 deletions mkdocs_bibtex/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,20 @@ def test_format_citations(self):
)
# TODO: Check CSL

def test_long_citation(self):
test_data = parse_file(os.path.join(test_files_dir, "long_cite.bib"))
self.plugin.csl_file = None
self.assertIn(
"Benjamin L\\. De Bivort and Bruno Van Swinderen",
self.plugin.format_citations(test_data.entries.items())["Bivort2016"],
)

self.plugin.csl_file = os.path.join(test_files_dir, "nature.csl")
self.assertIn(
"De Bivort, B. L. & Van Swinderen",
self.plugin.format_citations(test_data.entries.items())["Bivort2016"],
)

def test_full_bibliography(self):
test_data = parse_file(os.path.join(test_files_dir, "single.bib"))
self.plugin.csl_file = None
Expand Down
13 changes: 13 additions & 0 deletions test_files/long_cite.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@article{Bivort2016,
title = {Evidence for Selective Attention in the Insect Brain},
author = {De Bivort, Benjamin L. and Van Swinderen, Bruno},
year = {2016},
volume = {15},
pages = {1--7},
issn = {22145753},
doi = {10.1016/j.cois.2016.02.007},
abstract = {The capacity for selective attention appears to be required by any animal responding to an environment containing multiple objects, although this has been difficult to study in smaller animals such as insects. Clear operational characteristics of attention however make study of this crucial brain function accessible to any animal model. Whereas earlier approaches have relied on freely behaving paradigms placed in an ecologically relevant context, recent tethered preparations have focused on brain imaging and electrophysiology in virtual reality environments. Insight into brain activity during attention-like behavior has revealed key elements of attention in the insect brain. Surprisingly, a variety of brain structures appear to be involved, suggesting that even in the smallest brains attention might involve widespread coordination of neural activity.},
journal = {Current Opinion in Insect Science},
keywords = {attention,bees,drosophila,insects},
pmid = {27436727}
}

0 comments on commit 40474b8

Please sign in to comment.