Commit graph

47 commits

Author SHA1 Message Date
Craig Moyer
a3c81d46fe Add support for folder base journal.
Adds feature for issue #170 (and #398) where you configure your journal to
be a directory and entries are added as sub-directories and files:
yyyy/mm/dd.txt. Multiple entries in a day will go in the same file, but a
new entry for a specific day will create a new file (and directory
structure).

Fix failed test scenarios for folder journal.
2020-04-10 11:51:56 -07:00
Stav Shamir
8b7ebe2dcd Add test scenarios for the export feature (#824)
* Fix behave keyword "and" to correct case "And"
* Extract export_steps module
* Add scenario for XML export
* Add scenario for tags export
* Add scenario for fancy export
* Add scenario for yaml export
* Remove unused module export.py
* Run `make format`
* Fix `create_directory` step
2020-04-10 11:51:56 -07:00
MinchinWeb
04f6154c93 Apply black formatter to code
[Travis] add a linting stage (via `black`)
[Travis] update as per code review
Remove "Lint" as separate stage; have `black` check the output rather
than run the re-formmater
2020-04-10 11:51:56 -07:00
Jonathan Wren
46c4c88231 (#770) run black formatter on codebase for standardization 2020-04-10 11:51:56 -07:00
Peter Schmidbauer
8eb185f8a2 Add password confirmation dialog 2020-04-10 11:51:55 -07:00
MinchinWeb
70c946bc13 [Travis] add testing on Windows and Mac
See #739 (Python 3.8), #619 (Windows)
Appease the Travis gods
[Travis] no auto-ruby
[Travis] include a test in not UTC
see #742
[Travis] Add Python to PATH on Windows
[Travis] Windows: try Python 3.7 for cryptography wheels?
[Travis] Windows tests time out
2020-04-10 11:51:55 -07:00
Jonathan Wren
10d8a32b64 Squashed commit of the following:
commit 75113187432939a51486422c3f70b3a9e2bcf0aa
Merge: 74d1854 47e10fb
Author: Jonathan Wren <9453067+wren@users.noreply.github.com>
Date:   Thu Oct 24 17:02:10 2019 -0700

    Merge pull request #665 from notbalanced/issue_662

    Fixes Issue #662 - Day names not treated consistently for new entry

commit 74d1854a4bba468221b4eee254bdee2bb40f5d5a
Merge: 97e4d6a 6a5726a
Author: Jonathan Wren <9453067+wren@users.noreply.github.com>
Date:   Sat Oct 5 15:30:57 2019 -0700

    Merge pull request #418 from philipsd6/2.0-fancy_exporter

    Add exporter to output entries inside unicode box character boxes

commit 47e10fbee7
Author: Craig Moyer <craig.moyer@gmail.com>
Date:   Sun Sep 29 19:06:53 2019 -0400

    Fix issue #662 to properly handle day names as new entry dates and
    command line (-on, -from, -to).

commit 9588913100
Author: Craig Moyer <craig.moyer@gmail.com>
Date:   Sun Sep 29 08:27:27 2019 -0400

    Syncing with jrnl-org/master

commit 4c68eb193d
Merge: 81dfebb 97e4d6a
Author: Craig Moyer <craig.moyer@gmail.com>
Date:   Sun Sep 29 07:52:02 2019 -0400

    Merge remote-tracking branch 'upstream/master' into 2.0-rc1-maebert

commit 81dfebb2c0
Author: Manuel Ebert <manuel@1450.me>
Date:   Mon Apr 29 20:34:18 2019 +0200

    export changes

commit 6a5726acd2
Author: Philip Douglass <philip@philipdouglass.com>
Date:   Fri Dec 22 20:56:36 2017 -0500

    Enable FancyExporter plugin

commit 3d1b226871
Author: Philip Douglass <philip@philipdouglass.com>
Date:   Fri Jan 29 11:17:41 2016 -0500

    Add exporter to output entries inside unicode box character boxes
2020-04-10 11:51:55 -07:00
Aaron Lichtman
1fd1fcc00d Exit jrnl if no text entered into editor
Add test for aborting jrnl entry from editor
Use native mocking
Add comment explaining discrepancy between expected and asserted output
Fix check_empty_output method
Check message on stderr and patch subprocess.call
Add _mock_editor_function
Update features/steps/core.py
Add return from mock function
Add debug statements
Debug
Update features/steps/core.py
Move sys.exit() down
Fix test?
Fix test?
Fix test?
Clean up debug statements
Clean up debug statements
Remove extraneous code
Remove extra space
Add test for empty stdin input
Remove extra debug line
Fix test?
Fix test?
Update features/core.feature
Fix test?
Fix no stdin input test

Co-Authored-By: pspeter <peter.schmidb@gmail.com>
2020-04-10 11:51:55 -07:00
Peter Schmidbauer
9d8d6a83ae remove py2 remnants and use mocks in tests
fstring wip
Run pyupgrade
fix broken pyupgrade fstring
run pyupgrade on plugin dir
fixup! remove py2 remnants and use mocks in tests
small print bugfix
The file=sys.stderr was part of the format(), so an error got printed to
stdout
Drop use of codecs package
Use builtins.open() instead
fixup! remove py2 remnants and use mocks in tests
2020-04-10 11:51:55 -07:00
Jonathan Wren
13631b9a68 Fix issue #584 YAMLLoadWarning (#585) 2020-04-10 11:51:55 -07:00
Manuel Ebert
60a955de20 Template exporting FTW 2016-08-19 23:20:31 +00:00
Manuel Ebert
bdc9dc598d Fix Keyring tests 2016-08-19 21:43:27 +00:00
Manuel Ebert
3408440705 Fix that goddamn timezone test 2015-04-21 16:34:27 +02:00
Manuel Ebert
07fbf73dee Fix for #322 2015-04-21 15:49:27 +02:00
Manuel Ebert
f1907bd27d Fix test arg parsing 2015-04-20 14:12:34 +02:00
Manuel Ebert
539a88ed14 Tests for parsing issue fix 2015-04-05 18:38:37 +02:00
Manuel Ebert
6c18b6f3b4 More encoding madness 2015-04-05 06:38:38 +04:00
Manuel Ebert
6e52b5eb70 Tests for #333 2015-04-05 03:27:09 +04:00
Manuel Ebert
2615070df0 Hardcoded salt to fix crypto 2015-04-04 17:50:44 +11:00
Manuel Ebert
a1b5a4099e Work on cryptography 2014-09-27 13:15:46 -07:00
Manuel Ebert
e75e3d73a0 Converts tests to YAML 2014-09-12 15:28:12 -07:00
Matthias Vogelgesang
ae47c5bb80 Fix failing behave tests 2014-09-12 14:27:34 -07:00
Manuel Ebert
60c03d96d6 Fixes config tests 2014-09-12 14:22:45 -07:00
Matthias Vogelgesang
afae3d16a7 Use PyXDG to save config and journal in XDG dirs
This change also hides the CONFIG_PATH state information entirely within
the install module. Therefore, the cli module does not have to care about
checking existence of files and paths.
2014-09-12 14:20:05 -07:00
Manuel Ebert
1822f50c70 Tests for date parsing and -on 2014-07-21 13:30:36 +09:00
William Minchin
623fc076ad Convert from local util.get_local_timezone() to tzlocal.get_localzone()
one side effect is that a `pytz` object is returned rather than a
string, and so conversion to a string must be done explicitly at run
time where needed.
2014-01-29 09:57:15 -07:00
Manuel Ebert
46951cbe12 More unicode support 2014-01-23 15:14:20 +01:00
Manuel Ebert
bf9adeb28a Tests for new structure 2013-11-29 10:23:16 -08:00
Manuel Ebert
540c298565 Tests for starring 2013-11-03 20:02:28 -08:00
Manuel Ebert
65fab71bef User plain text keyring for testing 2013-10-20 13:30:42 -07:00
Manuel Ebert
13b7d1c1df Tests for storing password in keychain 2013-10-17 16:26:49 -07:00
Manuel Ebert
467f73d377 Better checking for failed runs 2013-08-28 12:36:00 -07:00
Manuel Ebert
1bab646c09 Tests for error messages on empty directories 2013-08-28 12:18:58 -07:00
Manuel Ebert
2a981d51e2 Tests for parsing DayOne entries without Timezone 2013-08-17 13:19:54 -07:00
Manuel Ebert
552d2a00ff Some testing goodies 2013-08-17 12:18:48 -07:00
Manuel Ebert
3549eff215 Adds regression test for #87 2013-08-14 14:00:42 -07:00
Manuel Ebert
5255e39448 Better tests for exporting to json 2013-08-06 18:10:42 -07:00
Manuel Ebert
d4cb4e64f6 Tests for filtering 2013-08-06 17:57:31 -07:00
Manuel Ebert
95e7660159 Fixes encryption tests 2013-07-22 21:24:25 +02:00
Manuel Ebert
c0733f36c5 Tests for encryption 2013-07-22 20:08:53 +02:00
Manuel Ebert
279547c350 Tests for using stderr prompts 2013-07-22 12:04:32 +02:00
Manuel Ebert
4b9b5e827b Tests for multiple journals 2013-07-22 10:11:37 +02:00
Manuel Ebert
03c1395c01 Python 3 compatibility for tests 2013-07-19 13:09:33 +02:00
Manuel Ebert
29005c0e07 Better Python2.6 compatibility 2013-07-19 13:03:27 +02:00
Manuel Ebert
13f8e668dc Mock stdin 2013-07-19 12:44:39 +02:00
Manuel Ebert
af16165159 Tests for writing entries from the command line 2013-07-19 11:36:39 +02:00
Manuel Ebert
47c90b6d40 Core testing 2013-07-18 22:49:22 +02:00