Jonathan Wren
cdad0d6289
Replace pyflakes with flake8 for linting
2021-07-03 15:49:18 -07:00
Jonathan Wren
c5a7d7027c
Move pytest-bdd code into separate files
...
Now that all the tests are passing, this breaks them up into a few
different files to make everything more organized.
Note: Pyflakes is complaining about some unused import statements.
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
54e5e96ad2
Force GitHub Actions to preserve line endings
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
fd349fb0fc
Implement ExitStack to handle mocks in pytest-bdd
...
- Fix failing DayOne test
- Make format and clean up extraneous comment
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
0c8efd5331
Cleanup last few tests
...
- Misc linting issues
- Whitespace cleanup
- Entire test suite is now passing
- Add misc todo items in comments
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
5572833652
Rewrite config checking steps in pytest-bdd
...
- Take out old type coersion (it was causing needles complexity)
- Take out `read_value_from_string` function
- Use taml parser to parse yaml instead of using custom function
- Update tests to use new implementation
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
b7b7bad2fb
Clarify and cleanup tests
...
- Run formatter
- Take out old tags
- Use new steps on tests
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
44b1762b7d
Implement stream redirection in pytest-bdd
...
- Take out old steps from format and input tests
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
512fb63e1f
Implement test to check editor temporary filename
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
5d4d68fe32
Implement directory changing and relative directory test
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
7647755e96
Implement journal existence check
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
ef25c50e16
Implement step for directory journals
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
4aabb73847
Implement datetime handling in pytest-bdd
...
- This was awful and convoluted
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
cda07bf8d9
Make steps use new config file
...
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
e19fab0615
Add new config file (for use in pytest-bdd)
...
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
e0980cf396
Update tests to use more scenario outlines
...
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
3d29b6b6a1
Fix star and tag feature language and add output should be empty test
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
8faa3ae32d
Update tests to use new steps
...
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
d15e683955
Update search features to use new steps
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
3ddfb4d594
Implement editor-related steps in pytest-bdd
...
- Implement mock editor fixture
- Add fixture to keep track of editor state
- Implement various steps to check editor state
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
ce64d7973b
Implement @skip_win and @skip_editor
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
36dc01bf30
Fixing custom template test and skipping some broken tests
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
148d3fdb18
Update test w/ new steps
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
a6a4417eff
Fix annoying poetry-generated Windows line endings
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
849ed16d67
Install pytest-icdiff and run poetry lock
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
11e0e84dcf
Fix test failing from lack of whitespace
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
430182a0a5
Implement JSON tests and remove "node" nomenclature from tests
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
48c9d9fa16
Implement tag tests in JSON
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
3cc3e387c5
Combine JSON and XML parsing tests
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
ef6ed93ecd
Add JSON parsing test and combine it with XML parsing test
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
3b044e3044
Ignore IO errors on Windows
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
b8c7a7c7e5
Add format tests to pytest-bdd
...
- Implement cache dir fixture and step
- Implement various steps to check the cache directory (files contained,
etc)
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
e2bb8cf0de
Add encryption test to pytest-bdd
...
- Clean up some formatting
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
3d3bd91700
Expand "we run" step to handling input better
...
- Use regex parser in pytest-bdd to support "we run" steps that also
have user input ("and enter")
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
e720430aa4
Implement "should" and "should not" handling
...
- Handling should and should not like this should reduce the amount of
fixtures we need for the test suite
- Add more password tests
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
c76ee8cd4f
Add more password tests to pytest-bdd
...
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
10b604ef89
Add more password tests to pytest-bdd
...
- Fix some input handling in steps (especially for passwords)
- Fix some formatting issues
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
6b27126c37
Implement password prompt steps in pytest-bdd
...
- Scaffold some tests that will be added later
- Add fixtures for journal name and keyring type
- Add "we should be prompted for a password" step
- Add "we should not be prompted for a password" step
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
d0f92113f4
Add no keyring encryption test to pytest-bdd
...
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
fe018ee241
Implement test keyrings and add password tests
...
- Implement TestKeyring
- Implement NoKeyring
- Implement FailedKeyring
- Copy in `read_value_from_string` function from old tests (will
probably rewrite this later)
- Add fixtures for keyrings
- Implement "we have a keyring" step
- Implement step to check specific config values for tests
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
1c78a30535
Fix bug in makefile
...
- Makefile no longer runs on virtual env modules
- Update some function names so pyflakes doesn't error
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Jonathan Wren
921ebdcdd5
Update mocks in "we run" step
...
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
5ad5bac786
Standardize line breaks in datetime tests
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
40a1a871cb
Migrate the rest of the delete tests from behave to pytest bdd
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
8754837f15
Add some functioning delete tests
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
7ccadebca0
Finish migrating datetime.feature to pytest bdd
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
a529ee5d06
Add another unreadable/readable date test
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
0c9b6cf85f
Add unreadable date test
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
f686e2b9f0
Fix local config overwrite when running pytest bdd
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00
Micah Jerome Ellison
7e6dd354cf
Add unreadable date test
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:49:18 -07:00