diff options
author | Alejandro Gallo <aamsgallo@gmail.com> | 2018-11-29 10:00:16 +0100 |
---|---|---|
committer | Alejandro Gallo <aamsgallo@gmail.com> | 2018-11-29 10:00:16 +0100 |
commit | d862b922b073914bded5a5b16e2897a09da3f9dc (patch) | |
tree | f7bd02e9bcd64db563e3af3ced598fcb8843aafa | |
parent | 579074c55f2e24de58a10dd6a8066b26fe95e91d (diff) |
Update tests and update version of slugifyv0.7.5
-rw-r--r-- | papis/__init__.py | 2 | ||||
-rw-r--r-- | papis/document.py | 2 | ||||
-rw-r--r-- | setup.py | 2 | ||||
-rw-r--r-- | tests/commands/test_explore.py | 13 |
4 files changed, 10 insertions, 9 deletions
diff --git a/papis/__init__.py b/papis/__init__.py index 520b5695..02e9f893 100644 --- a/papis/__init__.py +++ b/papis/__init__.py @@ -1,6 +1,6 @@ # Information __license__ = 'GPLv3' -__version__ = '0.7.4' +__version__ = '0.7.5' __author__ = __maintainer__ = 'Alejandro Gallo' __email__ = 'aamsgallo@gmail.com' diff --git a/papis/document.py b/papis/document.py index e619c426..fedd12c8 100644 --- a/papis/document.py +++ b/papis/document.py @@ -126,7 +126,7 @@ def to_bibtex(document): ref = re.sub(r'[;,()\/{}\[\]]', '', ref) bibtexString += "@%s{%s,\n" % (bibtexType, ref) - for bibKey in document.keys(): + for bibKey in sorted(document.keys()): logger.debug('%s : %s' % (bibKey, document[bibKey])) if bibKey in papis.bibtex.bibtex_key_converter: newBibKey = papis.bibtex.bibtex_key_converter[bibKey] @@ -48,7 +48,7 @@ setup( "beautifulsoup4>=4.4.1", "prompt-toolkit>=2.0.0", "bibtexparser>=0.6.2", - "python-slugify==1.2.5", + "python-slugify==1.2.6", "pyparser>=1.0", "pylibgen>=1.3.0", "habanero>=0.6.0", diff --git a/tests/commands/test_explore.py b/tests/commands/test_explore.py index dbb9f59a..673c39eb 100644 --- a/tests/commands/test_explore.py +++ b/tests/commands/test_explore.py @@ -38,14 +38,15 @@ class TestCli(tests.cli.TestCli): with open(path) as fd: bibtex = fd.read() expected_bibtex = ( - '@article{1,\n' - ' author = { J. Krishnamurti },\n' - ' title = { Freedom from the known },\n' - ' year = { 2009 },\n' - '}\n' + '@article{1,', + ' year = { 2009 },', + ' title = { Freedom from the known },', + ' author = { J. Krishnamurti },', + '}' ) - self.assertEqual(bibtex, expected_bibtex) + for chunk in expected_bibtex: + self.assertTrue(chunk in bibtex.split('\n')) def test_export_yaml(self): path = tempfile.mktemp() |