Commit graph

149 commits

Author SHA1 Message Date
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
9664924096 Move all password handling to EncryptedJournal
This commit should greatly simplify all password handling logic. No passwords are stored in the config dict anymore. Only the Encrypted Journals have any password related logic. I also had to remove some password fields from the test files, which shows how dangerous the previous approach was. A slight code change could've leaked passwords to the config file. However, I had to change the install progress a little bit to make this work. It will now not ask you for a password right away but rather if you want to encrypt or not. Only if you reply 'y' will it ask you for the password later on.
2020-04-10 11:51:56 -07:00
Jims
b8d43db558 Added case-insensitive searching of entry title and body
added search test
Renamed searching to contains. Made changes as per pull-request:
https://github.com/jrnl-org/jrnl/pull/740
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
Micah Jerome Ellison
ece057faa5 [GH-741] adding test for bug that displays all entries -on today 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
MinchinWeb
f9692b1f8d [Dayone] re-add tests
c.f. commit 7cbca9f60f
c.f. commit 398283a8db3177b1ae122e5b9d6a9d623cf9106f
[Dayone] Skip failing tests on Travis
Travis sets the timezone to UTC, which causes many tests to fail
2020-04-10 11:51:55 -07:00
Peter Schmidbauer
7f46d1a40a Fix handling of little-endian date format
Ever since version 2.0, when parsing a journal file, jrnl would not use
the custom date format string anymore. Instead, it relied on the
dateutil library to get the parsing right. This change was made to allow
people to change their date format without having to manually change
their file. However, this broke some existing date formats like
%d.%m.%Y, as it would falsely interpret the month as day and vice versa.
This commit adds some tests to catch this error and fixes it by trying
to parse the dates using the custom format first, only falling back to
dateutil when needed.
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
Justin Proffitt
c249c8ded9 Add '-not' flag for excluding tags from filter
Add tests for the excluding tags with -not
2020-04-10 11:51:55 -07:00
MinchinWeb
e14910c83f Switch to hashmark Markdown headers on export
Closes #487
[Markdown Export] deal with linebreaks in jrnl files
[YAML Exporter] apply fix just applied to Markdown Exporter
2020-04-10 11:51:55 -07:00
Micah Jerome Ellison
8abbdf4db5 [GH-632] confirming that each journal can be parsed during upgrade, and aborting upgrade if not
[GH-632] raising exception in upgrade.py on fail
Handling it in install.py to prevent config from being overwritten when upgrade fails
[GH-632] removing unnecessary whitespace
[GH-632] removing unreachable return statement
[GH-632] adding call to action to report issue when upgrade fails
2020-04-10 11:51:55 -07:00
Greg Bodnar
623fa6c307 Create encrypted journal
Add failing test for configuring an encrypted journal
Overload open for EncryptedJournal

This avoids the execution path that calls EncryptedJournal._create()
without a password parameter. It results in duplication of code that
requests and stores a password, which should be factored out in a
subsequent change.

Modify test to test for returned strings

The entered string for the password is not being used by the test and I
don't understand why.

Use util wrapper for getpass

This allows for tests to run without prompting for user input.
2020-04-10 11:51:55 -07:00
Jonathan Wren
b260ff35b9 #631 Escape data in square brackets 2020-04-10 11:51:55 -07:00
Micah Jerome Ellison
f37f82f782 [GH-614] resolving issues around unreadable dates and unparsed dates 2020-04-10 11:51:55 -07:00
Micah Jerome Ellison
b56026d989 #5 Removing DayOne 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
Philip Douglass
ba05411a80 User defined indent character (#419)
Make indent character configurable.
2016-04-15 23:00:49 -07:00
flight16
28d87861cc Merged PR 2015-12-28 21:36:17 -08:00
Manuel Ebert
4adb5c252a Update tests for templates 2015-07-01 22:23:13 -07: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
0d1b381bd1 Merge pull request #347 from MinchinWeb/2.0-rc1-markdown-export-fix
2.0 rc1 markdown export fix
2015-04-20 14:29:17 +02:00
Manuel Ebert
9bf4e52b2c Tests for #343 2015-04-20 14:25:20 +02:00
Manuel Ebert
8e7126a4b7 Merge branch 'pr/342' into 2.0-rc1 2015-04-20 14:15:57 +02:00
Manuel Ebert
22ae53407e Split tests 2015-04-20 14:13:34 +02:00
Manuel Ebert
f1907bd27d Fix test arg parsing 2015-04-20 14:12:34 +02:00
MinchinWeb
7e21472e2d grr...fix typo 2015-04-14 16:55:06 -06:00
MinchinWeb
8d46ddac46 Make the tests pass 2015-04-14 16:49:49 -06:00
MinchinWeb
0d44bcb41e Check for heading level error 2015-04-14 15:58:55 -06:00
MinchinWeb
f1a83a51ed Add testing for increasing Headings on Markdown export 2015-04-14 15:13:00 -06:00
flight16
a212e86503 Fix breaking test submitted in ebee196444. 2015-04-13 23:23:54 +09:00
flight16
ebee196444 Add single letter alias -s for option --short
--short was being used in a test for date logic, but I added a second
test for explicitness.
2015-04-13 09:08:43 +09: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
c508e0c574 Update all tests to new time format 2015-04-05 03:25:39 +04:00
Manuel Ebert
a5f08e6081 Introduce legacy classes 2015-04-05 07:25:22 +10: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
Manuel Ebert
09b94d1047 Remove deprecated tests 2014-09-12 14:28:03 -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