Test issues with part06-11_diary and part06-16_dictionary_file

Open Beginner friendly
#40 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
86/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python
Domain
testing-qa

Research direction

Start with part06-11_diary/test_diary.py around line 50 and part06-16_dictionary_file/test_dictionary_file.py around lines 53 and 67. Run the affected tests to confirm the extra newline counts, then adjust the assertions to match the intended output and verify the diary and dictionary-file test cases pass.

Written by the indexing model from the issue text.

Description

Instead of requiring 1 line of "Bye now!" print output for the test_1_exit_only in ex11, it expects 2 lines of it.

Similar thing in ex16, instead of requiring 1 line of "Bye!" on quit for test_1_exit_only, and 1 line of "Dictionary entry added" at the end of add command for test_2_remove_add_words_and_exit, its expects 2 lines of each.

For part06-11_diary:

line 50 in test_diary.py is:
self.assertTrue(len(output.split("\n")) == 2, f"Your program should output two lines with input\n{input_value}\nNow it outputs \n{output}")

It should be:
self.assertTrue(len(output.split("\n")) == 1, f"Your program should output two lines with input\n{input_value}\nNow it outputs \n{output}")

For part06-16_dictionary_file:

line 53 in test_dictionary_file.py is:
self.assertTrue(len(output.split("\n")) == 2, f"Program should output two lines with input\n{f(input_data)} now the output is \n{output}")

It should be:
self.assertTrue(len(output.split("\n")) == 1, f"Program should output two lines with input\n{f(input_data)} now the output is \n{output}")

and line 67 is:
self.assertTrue(len(output.split("\n")) == 4, f"Program should output two lines with input\n{f(input_data)} now the output is \n{output}")

It should be:
self.assertTrue(len(output.split("\n")) == 2, f"Program should output two lines with input\n{f(input_data)} now the output is \n{output}")

Dominant language
JavaScript
Stars
77
Forks
30
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rage/programming-26

All issues in rage/programming-26

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.