Olivier Mangin
c2e52ec4c4
Makes 'copy' the default for the `add_doc` configuration option.
7 years ago
Olivier Mangin
a8de97c327
Fixes #144 : behavior of add_copy mode during add.
...
- correctly handles add_copy mode and configuration,
- add option top force 'copy' mode (since the default had been changed
in between from 'copy' to 'move' this is now needed),
- fixes assumption in one test that the default is 'copy' (in other
words the test was broken and ensuring that the functionality was broken
too.),
- do not try to delete the source when it is an URL.
7 years ago
Olivier Mangin
ea2bc7f732
Merge branch 'master' into fix87
7 years ago
Olivier Mangin
3d76501a5c
Merge branch 'master' into fix/pyfakefs37
7 years ago
Fabien C. Y. Benureau
cf97f681ef
cleanup commented code, better reset_fs()
7 years ago
Fabien C. Y. Benureau
c76c7607f9
Upgrade pyfakefs to current version
...
Fix #148 . Also did some cleanup on the tests.
7 years ago
Olivier Mangin
5a47150aad
Adds option to ignore malformed bibtex files or entry during import.
7 years ago
Olivier Mangin
60650b874a
Addresses minor comments (error message and better test).
7 years ago
Olivier Mangin
8a7d143261
Improves behaviors related to bibtex decoding error.
...
- from editor input in add and edit commands,
- from files in import command.
7 years ago
Olivier Mangin
d8dc386a18
Fix fake input behavior in tests on unexpected input.
...
Because of the mechanism for catching exceptions in pubs, the
UnexpectedInput exception raised by FakeInput never reached the catch
statement in the CommandTestCase and raised a FakeSystemExit instead.
This commit monkey-patches the exception handler in the ui at the same
time as the patching of the input functions to ignore UnexptectedInput
at the ui level.
7 years ago
Olivier Mangin
2f48f37199
Fixes duplicated test names in same TestCase (1st was not run).
7 years ago
Olivier Mangin
fbd29d27a4
Merge pull request #141 from pubs/feat/editor_missing
...
error message when editor is missing
7 years ago
Olivier Mangin
8fe650c040
Use join for joining paths.
7 years ago
ksunden
a0525b5147
Remove unused /dev/null
7 years ago
ksunden
2f59b4f2ce
Clean up tests
7 years ago
ksunden
aaf2ed52c1
Use mock to test url command
7 years ago
Fabien C. Y. Benureau
6cd74a9966
error message when editor is missing
...
simplified a bit the ui code, to remove unecessary out-of-class functions
(needed anyway because of ui.error calls).
7 years ago
Fabien C. Y. Benureau
913a5d77b5
unicode citekey in python2; removes
7 years ago
Fabien C. Y. Benureau
c7e9470300
implement requested changes for #133
7 years ago
Fabien C. Y. Benureau
dc4e118c3c
make utf8 citekeys possible in python 2.7. closes #28
...
This involved many changes, some side effects of the change include:
- remove of all `u"abc"` forms, in favor of
`from __future__ import unicode_literals`. Their usage was
inconsistent anyway, leading to problems when mixing with
unicode content.
- improve the tests, to allow printing for usecase even when
crashing. Should make future test easier. This is done with a
rather hacky `StdIO` class in `p3`, but it works.
- for some reason, the skipped test for Python 2 seems to work
now. While the previous point might seem related, it is not clear
that this is actually the case.
7 years ago
Fabien C. Y. Benureau
38133fc053
fix for utf8 citekeys
7 years ago
Fabien C. Y. Benureau
9a6db894d8
fix fakeenv creation when used from a non-primary volume
7 years ago
Olivier Mangin
50a44d964c
Merge branch 'master' into version
7 years ago
Olivier Mangin
801e0c035f
Adds code version to cache. ( Fixes #129 )
...
Current code version is added to the cache on writting. If the cache
version does not match the code version on read, the cache is ignored
which means it resets.
7 years ago
Olivier Mangin
bcf216183f
Fixes tests for printing help on `--help` and without argument.
...
(fix #135 )
7 years ago
Fabien C. Y. Benureau
f8a8e0e207
pyfakefs 3.3
7 years ago
Olivier Mangin
71c2f40657
Merge branch 'master' into fix/link_customization
7 years ago
Olivier Mangin
a6d5df4059
Removes link and DOI customization. Fixes #119 .
7 years ago
Fabien C. Y. Benureau
82aad31e5d
test for common_string parsing
7 years ago
Olivier Mangin
6e39cea473
Adds `--strict` option to list to force strict unicode comparison.
7 years ago
Olivier Mangin
248bf62317
Fixes unicode for python2 in test_queries.
7 years ago
Olivier Mangin
f3ec9621ee
Adds and checks unicode normalization. Fixes #103 .
7 years ago
Olivier Mangin
1bcbf65dd8
Implements latex escape in queries.
7 years ago
Olivier Mangin
c87b89bf10
Fix wrong test.
7 years ago
Olivier Mangin
078b2084ff
Updates field orders to use 'url' and fixes broken test.
...
The field ordering test was broken on the latest bibtexparser since it
now replaces by default 'link' fields by 'url'.
7 years ago
Fabien C. Y. Benureau
8126a0e0b4
Fix bibtex testcase, closes #25 .
...
Also, made pyfakefs a straight pypi requirement, rather than a
github one, as no dev feature is needed since the last release.
7 years ago
Olivier Mangin
328f2a6d5e
Adds more checks and better error message against empty citekeys.
7 years ago
Olivier Mangin
860181e278
Adds argument to ignore fields in export. [ Closes #67 ]
...
`pubs export --ignore-fields abstract,note CiteKey`
7 years ago
Olivier Mangin
07be993d02
Moves to using bibtexparser's writer for bibdata. [ Fixes #33 ]
7 years ago
Bill Flynn
aa408e9b2d
[ #95 ] updated doi tests
7 years ago
Bill Flynn
e2ad39ca08
[ Fix #95 ] robust handling of DOIs
...
Added DOI regex function to utils.py which is called in add_cmd.py
upon specifying a new DOI. DOI validation applies directly on
argument parsing by using a custom argparse.Action.
7 years ago
Olivier Mangin
e069da518f
Fixes query tests (`assertFalse(not ...)` and wrong name).
7 years ago
Olivier Mangin
3ad4a73da1
Moves query code from list_cmd to didicated module.
7 years ago
Olivier Mangin
0bd8d5b8dc
Actually adds the functionality as well as a few more tests.
7 years ago
Olivier Mangin
84553d8eb3
[ Fix #90 ] Adds year ranges to queries.
7 years ago
Olivier Mangin
c54de5c3b6
Refactors paper filtering from queries.
7 years ago
Bill Flynn
ebbd2d4f19
added another test for #98
7 years ago
Bill Flynn
4362c649b2
Added alias description functionality to conf #98
...
Changed Alias constructor, added tests for this behavior, and added
a few lines in the default conf describing how to define alias
descriptions.
7 years ago
Olivier Mangin
3e31c4455e
Fixes argument and adds tests for overwrite on import.
7 years ago
Bill Flynn
37f076049b
Many tests on MacOS 10.12.06 were failing due to fakefs path issues.
...
Not sure if this is needed. Will see in the CI builds.
7 years ago