diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..46602a47 --- /dev/null +++ b/.vscode/launch.json @@ -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"] + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..de288e1e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.formatting.provider": "black" +} \ No newline at end of file diff --git a/tests/bdd/features/format.feature b/tests/bdd/features/format.feature index e6c72c4f..0cea90fe 100644 --- a/tests/bdd/features/format.feature +++ b/tests/bdd/features/format.feature @@ -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 | diff --git a/tests/lib/then_steps.py b/tests/lib/then_steps.py index 84461bc3..e0a93c77 100644 --- a/tests/lib/then_steps.py +++ b/tests/lib/then_steps.py @@ -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