Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ python -m pytest test_workouts.py
- ============================= test session starts ==============================
- platform linux -- Python 3.8.3, pytest-5.4.2, py-1.8.1, pluggy-0.13.1
- rootdir: /home/<user>/dev/projects/python/2018-and-2020/bitesofpy/Intro-freebies-101-110/inprogress/Bite 109 - Workout dict lookups and raising an exception
- collected 13 items
- test_workouts.py FFFFFFFFFFF.. [100%]
- =================================== FAILURES ===================================
- _ test_get_workout_valid_case_insensitive_dict_lookups[Monday-Go train Chest+biceps] _
- day = 'Monday', expected = 'Go train Chest+biceps'
- @pytest.mark.parametrize("day, expected", [
- ('Monday', 'Go train Chest+biceps'),
- ('monday', 'Go train Chest+biceps'),
- ('Tuesday', 'Go train Back+triceps'),
- ('TuEsdAy', 'Go train Back+triceps'),
- ('Wednesday', 'Go train Core'),
- ('wednesdaY', 'Go train Core'),
- ('Thursday', 'Go train Legs'),
- ('Friday', 'Go train Shoulders'),
- ('Saturday', CHILL_OUT),
- ('Sunday', CHILL_OUT),
- ('sundAy', CHILL_OUT),
- ('nonsense', INVALID_DAY),
- ('monday2', INVALID_DAY),
- ])
- def test_get_workout_valid_case_insensitive_dict_lookups(day, expected):
- > assert get_workout_motd(day) == expected
- E AssertionError: assert 'Not a valid day' == 'Go train Chest+biceps'
- E - Go train Chest+biceps
- E + Not a valid day
- test_workouts.py:23: AssertionError
- _ test_get_workout_valid_case_insensitive_dict_lookups[monday-Go train Chest+biceps] _
- day = 'monday', expected = 'Go train Chest+biceps'
- @pytest.mark.parametrize("day, expected", [
- ('Monday', 'Go train Chest+biceps'),
- ('monday', 'Go train Chest+biceps'),
- ('Tuesday', 'Go train Back+triceps'),
- ('TuEsdAy', 'Go train Back+triceps'),
- ('Wednesday', 'Go train Core'),
- ('wednesdaY', 'Go train Core'),
- ('Thursday', 'Go train Legs'),
- ('Friday', 'Go train Shoulders'),
- ('Saturday', CHILL_OUT),
- ('Sunday', CHILL_OUT),
- ('sundAy', CHILL_OUT),
- ('nonsense', INVALID_DAY),
- ('monday2', INVALID_DAY),
- ])
- def test_get_workout_valid_case_insensitive_dict_lookups(day, expected):
- > assert get_workout_motd(day) == expected
- E AssertionError: assert 'Not a valid day' == 'Go train Chest+biceps'
- E - Go train Chest+biceps
- E + Not a valid day
- test_workouts.py:23: AssertionError
- _ test_get_workout_valid_case_insensitive_dict_lookups[Tuesday-Go train Back+triceps] _
- day = 'Tuesday', expected = 'Go train Back+triceps'
- @pytest.mark.parametrize("day, expected", [
- ('Monday', 'Go train Chest+biceps'),
- ('monday', 'Go train Chest+biceps'),
- ('Tuesday', 'Go train Back+triceps'),
- ('TuEsdAy', 'Go train Back+triceps'),
- ('Wednesday', 'Go train Core'),
- ('wednesdaY', 'Go train Core'),
- ('Thursday', 'Go train Legs'),
- ('Friday', 'Go train Shoulders'),
- ('Saturday', CHILL_OUT),
- ('Sunday', CHILL_OUT),
- ('sundAy', CHILL_OUT),
- ('nonsense', INVALID_DAY),
- ('monday2', INVALID_DAY),
- ])
- def test_get_workout_valid_case_insensitive_dict_lookups(day, expected):
- > assert get_workout_motd(day) == expected
- E AssertionError: assert 'Not a valid day' == 'Go train Back+triceps'
- E - Go train Back+triceps
- E + Not a valid day
- test_workouts.py:23: AssertionError
- _ test_get_workout_valid_case_insensitive_dict_lookups[TuEsdAy-Go train Back+triceps] _
- day = 'TuEsdAy', expected = 'Go train Back+triceps'
- @pytest.mark.parametrize("day, expected", [
- ('Monday', 'Go train Chest+biceps'),
- ('monday', 'Go train Chest+biceps'),
- ('Tuesday', 'Go train Back+triceps'),
- ('TuEsdAy', 'Go train Back+triceps'),
- ('Wednesday', 'Go train Core'),
- ('wednesdaY', 'Go train Core'),
- ('Thursday', 'Go train Legs'),
- ('Friday', 'Go train Shoulders'),
- ('Saturday', CHILL_OUT),
- ('Sunday', CHILL_OUT),
- ('sundAy', CHILL_OUT),
- ('nonsense', INVALID_DAY),
- ('monday2', INVALID_DAY),
- ])
- def test_get_workout_valid_case_insensitive_dict_lookups(day, expected):
- > assert get_workout_motd(day) == expected
- E AssertionError: assert 'Not a valid day' == 'Go train Back+triceps'
- E - Go train Back+triceps
- E + Not a valid day
- test_workouts.py:23: AssertionError
- _ test_get_workout_valid_case_insensitive_dict_lookups[Wednesday-Go train Core] _
- day = 'Wednesday', expected = 'Go train Core'
- @pytest.mark.parametrize("day, expected", [
- ('Monday', 'Go train Chest+biceps'),
- ('monday', 'Go train Chest+biceps'),
- ('Tuesday', 'Go train Back+triceps'),
- ('TuEsdAy', 'Go train Back+triceps'),
- ('Wednesday', 'Go train Core'),
- ('wednesdaY', 'Go train Core'),
- ('Thursday', 'Go train Legs'),
- ('Friday', 'Go train Shoulders'),
- ('Saturday', CHILL_OUT),
- ('Sunday', CHILL_OUT),
- ('sundAy', CHILL_OUT),
- ('nonsense', INVALID_DAY),
- ('monday2', INVALID_DAY),
- ])
- def test_get_workout_valid_case_insensitive_dict_lookups(day, expected):
- > assert get_workout_motd(day) == expected
- E AssertionError: assert 'Not a valid day' == 'Go train Core'
- E - Go train Core
- E + Not a valid day
- test_workouts.py:23: AssertionError
- _ test_get_workout_valid_case_insensitive_dict_lookups[wednesdaY-Go train Core] _
- day = 'wednesdaY', expected = 'Go train Core'
- @pytest.mark.parametrize("day, expected", [
- ('Monday', 'Go train Chest+biceps'),
- ('monday', 'Go train Chest+biceps'),
- ('Tuesday', 'Go train Back+triceps'),
- ('TuEsdAy', 'Go train Back+triceps'),
- ('Wednesday', 'Go train Core'),
- ('wednesdaY', 'Go train Core'),
- ('Thursday', 'Go train Legs'),
- ('Friday', 'Go train Shoulders'),
- ('Saturday', CHILL_OUT),
- ('Sunday', CHILL_OUT),
- ('sundAy', CHILL_OUT),
- ('nonsense', INVALID_DAY),
- ('monday2', INVALID_DAY),
- ])
- def test_get_workout_valid_case_insensitive_dict_lookups(day, expected):
- > assert get_workout_motd(day) == expected
- E AssertionError: assert 'Not a valid day' == 'Go train Core'
- E - Go train Core
- E + Not a valid day
- test_workouts.py:23: AssertionError
- _ test_get_workout_valid_case_insensitive_dict_lookups[Thursday-Go train Legs] _
- day = 'Thursday', expected = 'Go train Legs'
- @pytest.mark.parametrize("day, expected", [
- ('Monday', 'Go train Chest+biceps'),
- ('monday', 'Go train Chest+biceps'),
- ('Tuesday', 'Go train Back+triceps'),
- ('TuEsdAy', 'Go train Back+triceps'),
- ('Wednesday', 'Go train Core'),
- ('wednesdaY', 'Go train Core'),
- ('Thursday', 'Go train Legs'),
- ('Friday', 'Go train Shoulders'),
- ('Saturday', CHILL_OUT),
- ('Sunday', CHILL_OUT),
- ('sundAy', CHILL_OUT),
- ('nonsense', INVALID_DAY),
- ('monday2', INVALID_DAY),
- ])
- def test_get_workout_valid_case_insensitive_dict_lookups(day, expected):
- > assert get_workout_motd(day) == expected
- E AssertionError: assert 'Not a valid day' == 'Go train Legs'
- E - Go train Legs
- E + Not a valid day
- test_workouts.py:23: AssertionError
- _ test_get_workout_valid_case_insensitive_dict_lookups[Friday-Go train Shoulders] _
- day = 'Friday', expected = 'Go train Shoulders'
- @pytest.mark.parametrize("day, expected", [
- ('Monday', 'Go train Chest+biceps'),
- ('monday', 'Go train Chest+biceps'),
- ('Tuesday', 'Go train Back+triceps'),
- ('TuEsdAy', 'Go train Back+triceps'),
- ('Wednesday', 'Go train Core'),
- ('wednesdaY', 'Go train Core'),
- ('Thursday', 'Go train Legs'),
- ('Friday', 'Go train Shoulders'),
- ('Saturday', CHILL_OUT),
- ('Sunday', CHILL_OUT),
- ('sundAy', CHILL_OUT),
- ('nonsense', INVALID_DAY),
- ('monday2', INVALID_DAY),
- ])
- def test_get_workout_valid_case_insensitive_dict_lookups(day, expected):
- > assert get_workout_motd(day) == expected
- E AssertionError: assert 'Not a valid day' == 'Go train Shoulders'
- E - Go train Shoulders
- E + Not a valid day
- test_workouts.py:23: AssertionError
- __ test_get_workout_valid_case_insensitive_dict_lookups[Saturday-Chill out!] ___
- day = 'Saturday', expected = 'Chill out!'
- @pytest.mark.parametrize("day, expected", [
- ('Monday', 'Go train Chest+biceps'),
- ('monday', 'Go train Chest+biceps'),
- ('Tuesday', 'Go train Back+triceps'),
- ('TuEsdAy', 'Go train Back+triceps'),
- ('Wednesday', 'Go train Core'),
- ('wednesdaY', 'Go train Core'),
- ('Thursday', 'Go train Legs'),
- ('Friday', 'Go train Shoulders'),
- ('Saturday', CHILL_OUT),
- ('Sunday', CHILL_OUT),
- ('sundAy', CHILL_OUT),
- ('nonsense', INVALID_DAY),
- ('monday2', INVALID_DAY),
- ])
- def test_get_workout_valid_case_insensitive_dict_lookups(day, expected):
- > assert get_workout_motd(day) == expected
- E AssertionError: assert 'Not a valid day' == 'Chill out!'
- E - Chill out!
- E + Not a valid day
- test_workouts.py:23: AssertionError
- ___ test_get_workout_valid_case_insensitive_dict_lookups[Sunday-Chill out!] ____
- day = 'Sunday', expected = 'Chill out!'
- @pytest.mark.parametrize("day, expected", [
- ('Monday', 'Go train Chest+biceps'),
- ('monday', 'Go train Chest+biceps'),
- ('Tuesday', 'Go train Back+triceps'),
- ('TuEsdAy', 'Go train Back+triceps'),
- ('Wednesday', 'Go train Core'),
- ('wednesdaY', 'Go train Core'),
- ('Thursday', 'Go train Legs'),
- ('Friday', 'Go train Shoulders'),
- ('Saturday', CHILL_OUT),
- ('Sunday', CHILL_OUT),
- ('sundAy', CHILL_OUT),
- ('nonsense', INVALID_DAY),
- ('monday2', INVALID_DAY),
- ])
- def test_get_workout_valid_case_insensitive_dict_lookups(day, expected):
- > assert get_workout_motd(day) == expected
- E AssertionError: assert 'Not a valid day' == 'Chill out!'
- E - Chill out!
- E + Not a valid day
- test_workouts.py:23: AssertionError
- ___ test_get_workout_valid_case_insensitive_dict_lookups[sundAy-Chill out!] ____
- day = 'sundAy', expected = 'Chill out!'
- @pytest.mark.parametrize("day, expected", [
- ('Monday', 'Go train Chest+biceps'),
- ('monday', 'Go train Chest+biceps'),
- ('Tuesday', 'Go train Back+triceps'),
- ('TuEsdAy', 'Go train Back+triceps'),
- ('Wednesday', 'Go train Core'),
- ('wednesdaY', 'Go train Core'),
- ('Thursday', 'Go train Legs'),
- ('Friday', 'Go train Shoulders'),
- ('Saturday', CHILL_OUT),
- ('Sunday', CHILL_OUT),
- ('sundAy', CHILL_OUT),
- ('nonsense', INVALID_DAY),
- ('monday2', INVALID_DAY),
- ])
- def test_get_workout_valid_case_insensitive_dict_lookups(day, expected):
- > assert get_workout_motd(day) == expected
- E AssertionError: assert 'Not a valid day' == 'Chill out!'
- E - Chill out!
- E + Not a valid day
- test_workouts.py:23: AssertionError
- =========================== short test summary info ============================
- FAILED test_workouts.py::test_get_workout_valid_case_insensitive_dict_lookups[Monday-Go train Chest+biceps]
- FAILED test_workouts.py::test_get_workout_valid_case_insensitive_dict_lookups[monday-Go train Chest+biceps]
- FAILED test_workouts.py::test_get_workout_valid_case_insensitive_dict_lookups[Tuesday-Go train Back+triceps]
- FAILED test_workouts.py::test_get_workout_valid_case_insensitive_dict_lookups[TuEsdAy-Go train Back+triceps]
- FAILED test_workouts.py::test_get_workout_valid_case_insensitive_dict_lookups[Wednesday-Go train Core]
- FAILED test_workouts.py::test_get_workout_valid_case_insensitive_dict_lookups[wednesdaY-Go train Core]
- FAILED test_workouts.py::test_get_workout_valid_case_insensitive_dict_lookups[Thursday-Go train Legs]
- FAILED test_workouts.py::test_get_workout_valid_case_insensitive_dict_lookups[Friday-Go train Shoulders]
- FAILED test_workouts.py::test_get_workout_valid_case_insensitive_dict_lookups[Saturday-Chill out!]
- FAILED test_workouts.py::test_get_workout_valid_case_insensitive_dict_lookups[Sunday-Chill out!]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement