Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Yahtzee Version 2 Testing: Lower Section The functions that you will test here are: - num_of_a_kind() - yahtzee() What to do Create a new file

image text in transcribed
image text in transcribed
Yahtzee Version 2 Testing: Lower Section The functions that you will test here are: - num_of_a_kind() - yahtzee() What to do Create a new file called test yahtzee2.py in the same folder as yahtzee2.py. Start by importing the functions you want to test from yahtzee2.py. Write six unit tests, covering the following cases: a) " 3 of a kind" found b) " 3 of a kind" not found c) " 4 of a kind" found d) " 4 of a kind" not found e) "Yahtzee" found f) "Yahtzee" not found Each test must have a hardcoded roll and a single assertion. Use the following template. All unit tests defined in the template must be present and implemented in your code (you may not omit anything). \# TODO: Import the functions you will be testing \# Version 1 tests here def test_three_of_a_kind_found(): Tests num_of_a_kind() with a roll that has " 3 of a kind". roll =# rooo (hardcode a roll that satisfies this test case) assert num_of_a_kind ( rol1, 3)=# \# Run your tests by calling python -m pytest test yahtzee2.py in the terminal. All tests should pass. How to debug Your unit tests can be failing for two reasons

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

Students also viewed these Databases questions

Question

4. Why is job analysis the foundation of many other HR activities?

Answered: 1 week ago

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago