Fabien C. Y. Benureau
232158db68
Merge branch 'master' into pr-191
6 years ago
Fabien C. Y. Benureau
e4665f734a
git plugin: addressed review + misc improvments
...
* fixed annoying recursion in exception handlers (fake_env and sand_env)
* "pubs git" always not quiet
* color option for git ouput through "pubs git"
* "pubs git" output without any "info:" prefix or extraneous new line.
* is_loaded() method for plugins
6 years ago
ksunden
994b4da69c
Check full output, not just year
6 years ago
ksunden
7ba016e54c
TST: Test contents of import, not that the command fails
6 years ago
Fabien C. Y. Benureau
6c929dbafa
fix tests for python 2.7
6 years ago
Fabien C. Y. Benureau
5dd65ffa03
fix tests
6 years ago
Fabien C. Y. Benureau
0df52efcd3
adding tests to git plugin
...
- git plugin now performs `git init`
- git call are checked
- only one git commit per pubs command
- SandboxedCommandTestCase for real hd usecase tests.
- `git --help` now documents `--config` and `--force-colors`
6 years ago
Olivier Mangin
3b6751ea1b
Minor: Removes duplicate mock import in test_usecase
6 years ago
Shane Stone
7645b0949c
Add test for pubs list using citekey filter in test_usecase.py
6 years ago
Shane Stone
d626fe4251
Add unit tests for CitekeyFilter
6 years ago
Olivier Mangin
c3cb713ae7
Fix test broken likely by pyyaml update by making it more explicit
...
- does not test a specific output from pyyaml dump anymore,
- explicitely check decode and encode-decode step.
6 years ago
Olivier Mangin
3a4acb9fa9
Partial fix for #188
6 years ago
Olivier Mangin
03dc4f192b
Fix test not passing because of bytestring on python 2.7
6 years ago
Olivier Mangin
c8352fb7df
Fixes test not passing because bitexparser's latex_to_unicode also normalizes
6 years ago
Olivier Mangin
fbc9b94f8d
Fix 177: convert latex to unicode before printing one-liner.
...
This commit actually introduces a new method on the paper object to
return a copy of the bibdata which entries' latex have been converted to
unicode.
6 years ago
Fabien C. Y. Benureau
7818e57ead
reduce the number of isbn test to avoid 403 status
6 years ago
Fabien C. Y. Benureau
9bf88649a3
fix #172
6 years ago
Fabien C. Y. Benureau
6865e29d15
fix for Python 2
6 years ago
Fabien C. Y. Benureau
b99c5b43fa
handle / in citekeys
6 years ago
Olivier Mangin
da70d3c381
Handles listing papers with documents without extension.
6 years ago
Fabien C. Y. Benureau
49e6c7d9c2
update tests
7 years ago
Fabien C. Y. Benureau
a58f1b1d5e
hotfix for #164
7 years ago
Fabien C. Y. Benureau
efb91b1ff4
hotfix for #165
7 years ago
Olivier Mangin
42d75d1230
Merge branch 'master' into fix/doc_add
7 years ago
Olivier Mangin
c2e52ec4c4
Makes 'copy' the default for the `add_doc` configuration option.
7 years ago
Olivier Mangin
c4bf5eef87
Merge branch 'master' into jma/arxiv
7 years ago
Fabien C. Y. Benureau
8e30ac7400
refix test + switch apis to https
7 years ago
Fabien C. Y. Benureau
0eb069c86a
fix test + sorted json
7 years ago
Fabien C. Y. Benureau
30a7094eaf
add arXiv tests
7 years ago
Olivier Mangin
7dae35e722
Adds the statistics command. ( Fixes #8 )
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
Fabien C. Y. Benureau
c62d1c3c50
move test data from pickle to json
7 years ago
Fabien C. Y. Benureau
fdb6e5541d
Add explanation for how mock work. Fix pickle protocol error for Python 2.7.
7 years ago
Fabien C. Y. Benureau
bf1b4cd9d7
mock mode for test_apis
...
The mock system relies on the PUBS_TESTS_MODE environmental variable.
See the `tests/mock_requests.py` code for details.
By defaults, fast mock tests are used with data pre-fetched from real
calls.
7 years ago
Fabien C. Y. Benureau
be80e75cbb
better error message when parsing of bibtex fails
...
Plus, slight refactoring: remove `databroker.verify()` method
7 years ago
Fabien C. Y. Benureau
938a53b8f5
python setup.py test + no connection case
...
- Make `python setup.py test work`. remove test/requirements.txt.
fix #154
- Detect if no connection is present, and skip tests if not.
stop-gap measure for issue #147
7 years ago
Fabien C. Y. Benureau
647fea8ddb
update doi fail test, fix isbn test
7 years ago
Fabien C. Y. Benureau
be253f9084
handling of arxiv errors
7 years ago
Fabien C. Y. Benureau
bf46702374
pytest fixes
...
pytest will automatically run/collect anything that begins with "test".
Renamed a few thing to avoid false positive.
7 years ago
Olivier Mangin
6e72b0e2f7
Merge branch 'master' into jma/arxiv
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