mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-03 23:16:14 +02:00
black-ify code
This commit is contained in:
parent
c4439f4371
commit
5de162e838
3 changed files with 4 additions and 5 deletions
|
@ -52,8 +52,8 @@ jobs:
|
||||||
poetry install --remove-untracked
|
poetry install --remove-untracked
|
||||||
poetry install
|
poetry install
|
||||||
poetry run python -m pip install ./tests/external_plugins_src/
|
poetry run python -m pip install ./tests/external_plugins_src/
|
||||||
cd ..
|
|
||||||
poetry shell
|
poetry shell
|
||||||
|
cd ..
|
||||||
# installed test plugins aren't recognized by "behave" if run from the
|
# installed test plugins aren't recognized by "behave" if run from the
|
||||||
# project's root folder, but "poetry run" doesn't work on folders upstream
|
# project's root folder, but "poetry run" doesn't work on folders upstream
|
||||||
# from project root
|
# from project root
|
||||||
|
|
|
@ -89,14 +89,12 @@ def entry_array_count(context, entry_number, name, items_number):
|
||||||
assert len(out_json["entries"][entry_number - 1][name]) == items_number
|
assert len(out_json["entries"][entry_number - 1][name]) == items_number
|
||||||
|
|
||||||
|
|
||||||
@then(
|
@then('entry {entry_number:d} should not have an array "{name}"')
|
||||||
'entry {entry_number:d} should not have an array "{name}"'
|
|
||||||
)
|
|
||||||
def entry_not_array_item(context, entry_number, name):
|
def entry_not_array_item(context, entry_number, name):
|
||||||
# note that entry_number is 1-indexed.
|
# note that entry_number is 1-indexed.
|
||||||
out = context.stdout_capture.getvalue()
|
out = context.stdout_capture.getvalue()
|
||||||
out_json = json.loads(out)
|
out_json = json.loads(out)
|
||||||
assert (name not in out_json["entries"][entry_number - 1])
|
assert name not in out_json["entries"][entry_number - 1]
|
||||||
|
|
||||||
|
|
||||||
@then("the output should be a valid XML string")
|
@then("the output should be a valid XML string")
|
||||||
|
|
|
@ -95,6 +95,7 @@ def get_exporter(format):
|
||||||
except (AttributeError, KeyError):
|
except (AttributeError, KeyError):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def get_importer(format):
|
def get_importer(format):
|
||||||
"""
|
"""
|
||||||
Given an import format, returns the (callable) class of the corresponding importer.
|
Given an import format, returns the (callable) class of the corresponding importer.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue