Commit graph

199 commits

Author SHA1 Message Date
Suhas
6d035e709e convenience context.args 2021-02-01 21:12:34 -05:00
Suhas
2f25e5cd12 implement test steps 2021-02-01 21:11:21 -05:00
Suhas
3626e44861 behave test scenario 2021-02-01 21:10:19 -05:00
Suhas
6e658c31df
Simplify config override syntax (#5)
* update tests and expected behavior

* clean up arg parsing tests

* update deserialization

* update deserialization

* config argparse action

* update override application logic

* update tests; delete unused imports

* override param must be list

* update docstring

* update test input to SUT

* update remaining override unittests

* make format

* forgot to update CLI syntax
2021-01-31 20:17:02 -05:00
Suhas
56255cd69c space 2021-01-28 20:52:14 -05:00
Suhas
adb7932817 make format 2021-01-28 20:52:14 -05:00
Suhas
3b7e05c69f update tests ith better verifications 2021-01-28 20:52:04 -05:00
Suhas
9a19c370e3 skip on win 2021-01-28 20:49:47 -05:00
dependabot[bot]
3731ccbb43 Bump keyring from 21.8.0 to 22.0.1
Bumps [keyring](https://github.com/jaraco/keyring) from 21.8.0 to 22.0.1.
- [Release notes](https://github.com/jaraco/keyring/releases)
- [Changelog](https://github.com/jaraco/keyring/blob/main/CHANGES.rst)
- [Commits](https://github.com/jaraco/keyring/compare/v21.8.0...v22.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-28 20:47:12 -05:00
Suhas
6e09f93f16 update tests with better verifications
make format

space

review feedbac
2021-01-28 20:47:00 -05:00
Suhas
b8b56124ee stick to config convention in testbed 2021-01-28 08:36:44 -05:00
Suhas
e85300eced formatting 2021-01-27 18:14:08 -05:00
Suhas
b2a60fd297 test different editor launch commands 2021-01-27 18:14:00 -05:00
Suhas
0f5dfade18 better, more specific behave tests 2021-01-27 18:13:10 -05:00
Suhas
0b61c6d699 update integ tests for new syntax 2021-01-25 20:33:01 -05:00
Suhas
7a54e6f458 add multiple override scenario spec 2021-01-25 08:53:35 -05:00
Suhas
bd61a78fba unittest multiple overrides 2021-01-25 08:52:50 -05:00
Suhas
fe4f18951f binary search misbehaving windows test 2021-01-25 07:21:34 -05:00
Suhas
27a370ce86 make format 2021-01-25 07:11:45 -05:00
Suhas
9f8be334fd rewrite test for better mock call expect 2021-01-25 07:11:17 -05:00
Suhas
5da5027af2 update test config 2021-01-25 07:10:56 -05:00
Suhas
e173e12edf remove unused import 2021-01-25 06:59:00 -05:00
Suhas
c8b737e459 code cleanup 2021-01-25 06:56:12 -05:00
Suhas
d348dbd55e move override behave tests out of core 2021-01-24 19:12:59 -05:00
Suhas
ededf23afa cleanup 2021-01-24 16:07:57 -05:00
Suhas
b92dd7edc7 make format 2021-01-24 11:10:00 -05:00
Suhas
99030c4623 iterate on behave step 2021-01-24 11:09:45 -05:00
Suhas
9bab1aee87 rewrite behavior scenario 2021-01-24 11:08:11 -05:00
Suhas
80d2c609ba begin TDD of dot notated overrides 2021-01-24 07:18:48 -05:00
Suhas
1a8bcfca64 rename --override to --config-override 2021-01-23 21:30:33 -05:00
Suhas
f978cee899 Merge branch 'develop' of https://github.com/jrnl-org/jrnl into develop 2021-01-23 19:18:11 -05:00
eshrh
8a78c34917
Support title splitting for fullwidth CJK terminals (#1163)
* Split by fullwidth terminals without spaces.
* Add test
* Update write.feature
2021-01-23 15:29:43 -08:00
Suhas
77646eaa1a make format 2021-01-23 11:18:13 -05:00
Suhas
43b8407ad5 implement editor override step 2021-01-23 11:08:01 -05:00
Suhas
12d2f48f97 add linewrap override scenario 2021-01-23 11:07:51 -05:00
Suhas
2fc19c41b9 start writing integration test 2021-01-21 22:48:01 -05:00
Micah Jerome Ellison
9e6cd8820f
Fix OS compatibility issues for editors with spaces, slashes, and quotes (#1153)
* Fix inverted POSIX check, refactor os_compat, and add tests for it
* Fix missing parentheses and remove skip_win on test that is passing in Windows now
* Fix expected quotes in quoted args
* Make  output clearer on failing test
* Bringing skip_win back to test whose failure is a bit more complicated than expected
2021-01-16 15:19:11 -08:00
Karim Rahal
f0e8fa2060
Add new -today-in-history, -month, -day, and -year search filters (#1145)
* Introduce -reminisce, -month, -day, and -year
* Update expected_args in parse_args tests
* Add check before creating compare_d
* Misc changes
* Implement testing for -month, -day, -year, and -reminisce
* Compress tests into one Scenario Outline
* Fix failing tests by updating dates_similar journal
* Create 'we set current date and time to' step
* Use time.parse in reminisce
* Update dates_similar journal
* Make 'Searching in a journal' test shorter
* Lint
* Implement reminiscing test
* Add combination tests
* Finalize tests
* Finalize pytests
* Simplify reminisce tests
* Change reminsice help (since it also shows today's entries)
* Re-do tests; use various tests
* Remove old test data
* Better scenario description
* Standardize format for compare_d
* Rename -reminisce to -today-in-history
2021-01-16 14:55:27 -08:00
Karim Rahal
a6b828e892
Add new date format (--format date) for heatmapping (#1146)
* Create datecount plugin
* Fix plugin import
* Update datecount format
* Create datecount test
* Remove outdated comment
* Remove unnecessary datecount export condition
* Update test config
* Move get_date_counts into DateCountExporter; misc changes
* Use --format instead of --export in datecount test
* Update datecount test to include configs
* Better datecount test
* Remove old tests
* Change 'datecounts' to 'dates'
2021-01-16 14:50:47 -08:00
Seopril
5c0a2d4c4e
Fix YAML export formatting(#1065) (#1150)
* Fix YAML export syntax
* Fix YAML body block indentation
2021-01-16 14:44:55 -08:00
Micah Jerome Ellison
c155bafa84
Notify user when config directory can't be created because there is already a file with the same name (#1134)
* Moving configuration values and methods from install.py to config.py -- everything is broken right now
* Using context to store config path - still lots broken
* Use mocks and context.config_path to store test configs - many tests still broken though
* Update changelog [ci skip]
* Fix jrnl --ls crash
* Fix crash when no editor configured
* Attempt to patch config path with test data - doesn't appear to be working
* Properly use patched config path and add config given to scenario that wasn't using it
* Fix copypasta
* Fix editor test that needed patched config and trapping for system exit
* Add exception and handling for when configuration directory is actually a file
* Remove extraneous comment
* Use more generic JrnlError with messaging switchboard
* Format code a bit nicer
* Remove unnecessary given in diagnostic test
* Ensure full error message is output
* Remove unnecessary whitespace characters
2021-01-02 15:19:44 -08:00
Karim Rahal
57de4f9ba4
Fix keyring error handling (#1138)
* Capture KeyringLocked exception and allow manual password entry
* Create LockedKeyring for steps
* Support types in set_keyring step
* Clarify LockedKeyring docs
* Deal with locked exceptions elsewhere too
* Create behave tests for locked keyring
* Fix linting
* Fix keyring step to allow no type
* Handle all keyring retrieval errors
* Better keyring error handling
* Remove locked keyring for steps; generalize failed keyring
* Finalize tests for keyring handling
* Update set_keyring step
* Make password of failed keyring encryption test more semantic
2021-01-02 13:26:45 -08:00
Karim Rahal
e9fd5cdc0e
Allow custom extensions when editing (for easier syntax highlighting) (#1139)
* Create tests and steps for temporary filename suffix
* Have temporary filename suffix be -{template_filename} or .jrnl
* Finalize extension_editor_file
* Make suffix local variable in get_text_from_editor
2021-01-02 13:23:15 -08:00
Micah Jerome Ellison
9fe56b9e10
Comply with GPL by acknowledging all authors and including license info in each source file (#1121)
* Update authors to "jrnl contributors" to comply with GPL3
* Include jrnl email address with contributors
* Include GPL notice in jrnl --version
* Apply consistent copyright and license to all Python files
* Add copyright and license to documentation
* Add copyright and license to docs theme
* Wiping poetry cache to try to resolve a test issue
* Testing with Python 3.9.0 in attempt to bypass GitHub Actions failure in 3.9.1
* make format
* Exclude Windows Python 3.9 build which is failing due to a GitHub Actions problem
* Modify testing to get around this 3.9 issue...
* Fix exclude
2020-12-19 22:28:22 -08:00
Micah Jerome Ellison
b511461cfa
Fix Unicode encoding failure in directory export when creating filenames from journal titles with certain characters (#1090)
Fix Unicode encoding failure in directory export when creating filenames from journal titles with certain characters
2020-11-21 15:41:08 -08:00
Jonathan Wren
cfdd05358a
Add ability to put --edit partly through a cli entry to move it to the editor (#1091)
also add some functionality to test suite to see what the editor file contents were and make assertions about it
2020-11-21 15:20:21 -08:00
Jonathan Wren
4d97110183
Add initial config for Github Actions (#1078)
* Add initial config to test github actions

* remove other CI configs so PR doesn't get bogged down

* add poetry

* skip failing test, update behave output

* add multiple python versions

* add test cache

* try to use matrix for python version

* try to cache pip installation

* add other OSes

* whitespace changes

* skip failing test on windows

* add pip cache

* take out pip cache

* clean up, add linting steps

* add release branch to testing

* clean up

* add initial a11y config for docs site

* take out junit for now

* add junit annotations

* try different junit reporter

* add junit annotations into same workflow

* linter fix

* make junit step always run

* more junit

* clean up

* disable a11y exit code for now (always pass)

* put back travis and circle so we can temporarily run everything in tandem

* fix for issues with secret tokens
2020-11-14 12:42:36 -08:00
Micah Jerome Ellison
c38c39efee
Update dependencies - pyxdg, pytest, black (#1076)
* Update version pin on pyxdg and run poetry update
* Update pytest pin and rerun poetry update
* Update black pin to latest version, poetry update, and make format
2020-11-14 12:42:34 -08:00
joaquin garmendia
8c2de0e6d7
Add display format option to config file. (#1050)
* Add display format option to config file.
* Add tests.
* Fix `black` error.
* Change nested if to top level.
2020-10-17 18:53:34 -07:00
Micah Jerome Ellison
05d0a0cc83 Fix version number test failing on lack of patch version after change to 2.5 2020-10-17 15:38:06 -07:00