Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use the following Python code to answer the given prompts. **Important note: formatting and casing in Canvas fill-in the blank questions matter. Please read any

Use the following Python code to answer the given prompts.

**Important note: formatting and casing in Canvas fill-in the blank questions matter. Please read any formatting notes and use them in your answers accordingly. Failure to follow formatting rules can yield in answers being marked incorrect.

a) How many tests will run in Pytest? (a single number should be given in numerical form -- as in, don't spell the number)

b) What value should be replaced in to make this test a valid PyTest test? (case sensitivity matters!)

c) Assuming the you run a PyTest file that yields a pass, a failure, a failure, and a pass (in that order), what would the pass/success report yield? (this should be a string of characters with not whitespace between the characters)

d) If you wanted to edit the parametrize function to pass two values, with the first being named item and the second being named value, how would you denote this in the parameter? (Include double quotations -- legitimately type it the way you would if you were editing the code. Use the names provided. Casing matters)

image text in transcribed

Use the following Python code to answer the given prompts. **Important note: formatting and casing in Canvas fill-in the blank questions matter. Please read any formatting notes and use them in your answers accordingly. Failure to follow formatting rules can yield in answers being marked incorrect. def convertToInt(item): num = int(item) @pytest.mark.parametrize("item", [2, "Hello", "2.0", 4.5]) def test_convertToInt(item): assert convertToInt(item) == replace me a) How many tests will run in Pytest? (a single number should be given in numerical form as in, don't spell the number) b) What value should be replaced in to make this test a valid PyTest test? (case sensitivity matters!) c) Assuming the you run a PyTest file that yields a pass, a failure, a failure, and a pass (in that order), what would the pass/success report yield? (this should be a string of characters with not whitespace between the characters) d) If you wanted to edit the parametrize function to pass two values, with the first being named item and the second being named value, how would you denote this in the parameter? (Include double quotations - legitimately type it the way you would if you were editing the code. Use the names provided. Casing matters)

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

Step: 3

blur-text-image

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

Database Systems On GPUs In Databases

Authors: Johns Paul ,Shengliang Lu ,Bingsheng He

1st Edition

1680838482, 978-1680838480

More Books

Students also viewed these Databases questions