mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 08:38:32 +02:00
WIP: Test debugging + scaffolding
This commit is contained in:
parent
ec724109c0
commit
23ae0fa1cc
4 changed files with 53 additions and 2 deletions
19
.vscode/launch.json
vendored
Normal file
19
.vscode/launch.json
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Python: Module",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"module": "jrnl",
|
||||
"justMyCode": true,
|
||||
"args": [
|
||||
"--export",
|
||||
"heatmap",
|
||||
"--debug"]
|
||||
}
|
||||
]
|
||||
}
|
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"python.formatting.provider": "black"
|
||||
}
|
|
@ -570,8 +570,30 @@ Scenario Outline: Export calendar heatmap
|
|||
And we use the password "test" if prompted
|
||||
When we run "jrnl --format calendar"
|
||||
Then the output should be
|
||||
2013-06-09, 1
|
||||
2013-06-10, 1
|
||||
──────────────────────────────────────────────────────────────────────── 2013 ─────────────────────────────────────────────────────────────────────────
|
||||
|
||||
June 2013 (2 entries) July 2013 (No entries) August 2013 (No entries) September 2013 (No entries) October 2013 (No entries)
|
||||
|
||||
Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
1 2 1 2 3 4 5 6 7 1 2 3 4 1 1 2 3 4 5 6
|
||||
3 4 5 6 7 8 9 8 9 10 11 12 13 14 5 6 7 8 9 10 11 2 3 4 5 6 7 8 7 8 9 10 11 12 13
|
||||
10 11 12 13 14 15 16 15 16 17 18 19 20 21 12 13 14 15 16 17 18 9 10 11 12 13 14 15 14 15 16 17 18 19 20
|
||||
17 18 19 20 21 22 23 22 23 24 25 26 27 28 19 20 21 22 23 24 25 16 17 18 19 20 21 22 21 22 23 24 25 26 27
|
||||
24 25 26 27 28 29 30 29 30 31 26 27 28 29 30 31 23 24 25 26 27 28 29 28 29 30 31
|
||||
30
|
||||
|
||||
November 2013 (No entries) December 2013 (No entries)
|
||||
|
||||
Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
1 2 3 1
|
||||
4 5 6 7 8 9 10 2 3 4 5 6 7 8
|
||||
11 12 13 14 15 16 17 9 10 11 12 13 14 15
|
||||
18 19 20 21 22 23 24 16 17 18 19 20 21 22
|
||||
25 26 27 28 29 30 23 24 25 26 27 28 29
|
||||
30 31
|
||||
|
||||
|
||||
Examples: configs
|
||||
| config_file |
|
||||
|
|
|
@ -84,8 +84,15 @@ def output_should_not_contain(expected_output, cli_run):
|
|||
@then(parse("the output should be\n{expected_output}"))
|
||||
@then(parse('the output should be "{expected_output}"'))
|
||||
def output_should_be(expected_output, cli_run):
|
||||
from pprint import pprint
|
||||
actual = cli_run["stdout"].strip()
|
||||
print("ACTUAL: \n\n")
|
||||
print(type(actual))
|
||||
pprint(actual)
|
||||
expected = expected_output.strip()
|
||||
print("EXPECTED: \n\n")
|
||||
print(type(expected))
|
||||
pprint(expected)
|
||||
assert actual == expected
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue