Jonathan Wren
42f926c436
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:44:18 -07:00
Jonathan Wren
22c63a8e79
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:44:18 -07:00
Jonathan Wren
20160b2ee9
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:44:18 -07:00
Jonathan Wren
c15b965c0b
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:44:18 -07:00
Micah Jerome Ellison
d93e768ed7
Implement test to check editor temporary filename
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:44:18 -07:00
Micah Jerome Ellison
a689d753cd
Implement directory changing and relative directory test
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:44:18 -07:00
Micah Jerome Ellison
a79fca1623
Implement journal existence check
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:44:18 -07:00
Micah Jerome Ellison
abd74895fb
Implement step for directory journals
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:44:18 -07:00
Jonathan Wren
4bcd3da3ec
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:44:13 -07:00
Jonathan Wren
ab027ca62c
Make steps use new config file
...
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:43:17 -07:00
Jonathan Wren
8fcf00578f
Add new config file (for use in pytest-bdd)
...
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:43:17 -07:00
Jonathan Wren
8f0e78adeb
Update tests to use more scenario outlines
...
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
ae3b26c6c8
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:43:17 -07:00
Jonathan Wren
d4ff1797a1
Update tests to use new steps
...
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
e6c91f21c3
Update search features to use new steps
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Jonathan Wren
b1a625824d
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:43:17 -07:00
Micah Jerome Ellison
487ba05bcd
Implement @skip_win and @skip_editor
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
056b7266c4
Fixing custom template test and skipping some broken tests
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
819e6a613c
Update test w/ new steps
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
b25839be8c
Fix annoying poetry-generated Windows line endings
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
009f03f3e1
Install pytest-icdiff and run poetry lock
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
493ae01a7c
Fix test failing from lack of whitespace
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
aea7d36900
Implement JSON tests and remove "node" nomenclature from tests
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
5c4d3b8c1b
Implement tag tests in JSON
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
1dc45bd7e6
Combine JSON and XML parsing tests
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
ea55005a5d
Add JSON parsing test and combine it with XML parsing test
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
c5906b273f
Ignore IO errors on Windows
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Jonathan Wren
b238064f69
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:43:17 -07:00
Jonathan Wren
724deb25fa
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:43:17 -07:00
Jonathan Wren
4d7eea7f83
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:43:17 -07:00
Jonathan Wren
4813e2dcc4
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:43:17 -07:00
Jonathan Wren
2c607f3ef7
Add more password tests to pytest-bdd
...
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:43:17 -07:00
Jonathan Wren
0389af9277
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:43:17 -07:00
Jonathan Wren
5bc581b2ea
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:43:17 -07:00
Jonathan Wren
b1a74d3cac
Add no keyring encryption test to pytest-bdd
...
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:43:17 -07:00
Jonathan Wren
c61b05a49d
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:43:17 -07:00
Jonathan Wren
1634b1806a
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:43:17 -07:00
Jonathan Wren
cecec48754
Update mocks in "we run" step
...
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
cd7866bc08
Standardize line breaks in datetime tests
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
c5463497ff
Migrate the rest of the delete tests from behave to pytest bdd
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
5631c10f2d
Add some functioning delete tests
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
65018fe74e
Finish migrating datetime.feature to pytest bdd
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
b6aa331a7d
Add another unreadable/readable date test
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
293e82d3f8
Add unreadable date test
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
7c2b079b51
Fix local config overwrite when running pytest bdd
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
2b930bcd8f
Add unreadable date test
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Micah Jerome Ellison
fef5d8d50a
Add abbreviated weekday test
...
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-07-03 15:43:17 -07:00
Jonathan Wren
5145251166
Expand "we run" step in pytest-bdd
...
- Add some necessary fixtures
- Add datetime test
- Implement "the output should not contain" step
- Implement "the output should contain the date" step
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:43:17 -07:00
Jonathan Wren
ae5406dce2
Rename test functions for clarity
...
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:43:17 -07:00
Jonathan Wren
80eb5b3008
Implement "the output should be" step
...
- Add another datetime test
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:43:17 -07:00