WIP: Test debugging + scaffolding

This commit is contained in:
Aaron Lichtman 2024-01-15 15:00:16 -08:00
parent ec724109c0
commit 23ae0fa1cc
No known key found for this signature in database
GPG key ID: D046D019DC745EDA
4 changed files with 53 additions and 2 deletions

19
.vscode/launch.json vendored Normal file
View 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
View file

@ -0,0 +1,3 @@
{
"python.formatting.provider": "black"
}

View file

@ -570,8 +570,30 @@ Scenario Outline: Export calendar heatmap
And we use the password "test" if prompted And we use the password "test" if prompted
When we run "jrnl --format calendar" When we run "jrnl --format calendar"
Then the output should be Then the output should be
2013-06-09, 1 2013
2013-06-10, 1
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 Examples: configs
| config_file | | config_file |

View 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\n{expected_output}"))
@then(parse('the output should be "{expected_output}"')) @then(parse('the output should be "{expected_output}"'))
def output_should_be(expected_output, cli_run): def output_should_be(expected_output, cli_run):
from pprint import pprint
actual = cli_run["stdout"].strip() actual = cli_run["stdout"].strip()
print("ACTUAL: \n\n")
print(type(actual))
pprint(actual)
expected = expected_output.strip() expected = expected_output.strip()
print("EXPECTED: \n\n")
print(type(expected))
pprint(expected)
assert actual == expected assert actual == expected