Commit graph

38 commits

Author SHA1 Message Date
Suhas
528ce1efe2 make format 2021-01-28 08:40:28 -05:00
Suhas
abbb2c502f organize deserialization unittests 2021-01-27 18:09:10 -05:00
Suhas
3b74c2dec0 make format 2021-01-25 21:04:47 -05:00
Suhas
432e76698e update unittests for new syntax 2021-01-25 20:32:42 -05:00
Suhas
3ea043899a make format 2021-01-25 09:57:19 -05:00
Suhas
f1b260655d make format 2021-01-25 08:55:27 -05:00
Suhas
ba8db5ddf6 uncomment dot notation unittest 2021-01-25 08:53:20 -05:00
Suhas
bd61a78fba unittest multiple overrides 2021-01-25 08:52:50 -05:00
Suhas
c31fa084f3 make format 2021-01-24 19:15:04 -05:00
Suhas
9540d34964 refactor recursive code 2021-01-24 19:14:46 -05:00
Suhas
b92dd7edc7 make format 2021-01-24 11:10:00 -05:00
Suhas
2d7ff73696 clean up unittests 2021-01-24 11:09:23 -05:00
Suhas
80d2c609ba begin TDD of dot notated overrides 2021-01-24 07:18:48 -05:00
Suhas
9676290c27 move override implementation into own module 2021-01-24 07:17:53 -05:00
Suhas
1a8bcfca64 rename --override to --config-override 2021-01-23 21:30:33 -05:00
Suhas
1bd275bf54 make format 2021-01-23 12:18:28 -05:00
Suhas
b82391deaa remove unused imports 2021-01-23 12:16:07 -05:00
Suhas
77646eaa1a make format 2021-01-23 11:18:13 -05:00
Suhas
9e2b7dd0c1 refactor override unittest 2021-01-21 22:47:29 -05:00
Suhas
c4b3d51181 make format 2021-01-20 21:35:26 -05:00
Suhas
554d25ae17 trivial whitespace change 2021-01-20 15:11:48 -05:00
Suhas
53d7d8cea4 add jrnl interface test for overriden configurations 2021-01-20 15:09:45 -05:00
sugas182
ee7cd44a32 remove unneeded import 2021-01-19 21:15:03 -05:00
sugas182
110e2b9022 add test and argument handler for runtime override of configurations. 2021-01-19 09:03:43 -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
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
Micah Jerome Ellison
48cde1b473
Check for readline module instead of Windows when initializing autocomplete in install (#1104) 2020-12-04 15:13:38 -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
Jonathan Wren
631e08a557
Clean up help screen, get rid of util.py (#1027)
* More refactoring of cli.py

break up code from cli.py (now in jrnl.py) up into smaller functions
get rid of export mode
move --encrypt and --decrypt to commands.py
clean up the help screen even more
update flag name for import

* reorganize code, move around lots of functions

* clean up import statements

* move run function out of cli and into jrnl

* rename confusingly named function

* move editor function into editor file

* rename parse_args.py to args.py to make room for more args functions

* Fix error in test suite for windows

I accidentally flipped the conditional, so this fixes it.

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>

* Update app description on help screen

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2020-08-22 11:40:39 -07:00
Jonathan Wren
a54ed90259 Move import to be standalone command to reduce clutter in cli.py 2020-08-01 15:54:13 -07:00
Jonathan Wren
626a18a6ec Update more arg parsing options and handling 2020-08-01 15:54:13 -07:00
Jonathan Wren
fb184c5f5e Move standalone commands into their own file
Also, cleaned up the way the arg parser handles standalone commands.
Rather than checking individually for each command, you can now register
the command in the proper place, and it will be run with all known
arguments (and cofig if available).
2020-08-01 15:54:13 -07:00
Jonathan Wren
5922ca41ee Update arg parsing to better handle optinal journal name
Fixes #520 -and parameter seems to only work for the default journal
2020-08-01 15:54:13 -07:00
Jonathan Wren
2b2f24449f update tests 2020-08-01 15:54:13 -07:00
Micah Jerome Ellison
8d702fee9d Add unit testing via pytest (#987)
* Add pytest to project

Includes a couple sample tests, a note in CONTRIBUTING, and inclusion in the makefile

* Include pytest in Travis build
2020-06-20 14:30:15 -07:00
Manuel Ebert
13f8e668dc Mock stdin 2013-07-19 12:44:39 +02:00
Manuel Ebert
dfa8278cb5 Experimental new directory structure 2012-05-24 13:23:46 +02:00