you will be writing your own test cases from scratch. You must implement *at least* 2...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
you will be writing your own test cases from scratch. You must implement *at least* 2 more test cases to test your code. These test cases must be in their own functions, their names must start with "test_", and the test names must be unique. These test cases must pass on a working version of the prep3 code (i.e. a working version of Salaried Employee, Hourly Employee, Company) and must create at least one Salaried Employee or Hourly Employee. You must NOT access any private variables. There are no other requirements for the test cases. You can verify whether your test cases are acceptable by running the automated tests on Markus. TODO: Implement *at least* 2 more test cases to test your code. Sample test cases below == === Use the below test cases as an example for writing your own test cases, and as a start to testing your prep3.py code. WARNING: THIS IS CURRENTLY AN EXTREMELY INCOMPLETE SET OF TESTS! We will test your code on a much more thorough set of tests! WITYMA def test_total_pay_basic() -> None: e = Salaried Employee (14, 'Gilbert the cat', 1200.0) e.pay (date (2018, 6, 28)) e.pay (date (2018, 7, 28)) e.pay (date (2018, 8, 28)) assert e.total_pay() def test_total_payroll_mixed () -> None: my_corp = Company ( [Salaried Employee (24, 'Gilbert the cat', 1200.0), HourlyEmployee (25, 'Chairman Meow', 500.25, 1.0)]) my_corp.pay_all(date (2018, 6, 28)) assert my_corp.total_payroll() if name import pytest == 300.0 _main__' == 600.25 pytest.main(['prep3_starter_tests.py']) you will be writing your own test cases from scratch. You must implement *at least* 2 more test cases to test your code. These test cases must be in their own functions, their names must start with "test_", and the test names must be unique. These test cases must pass on a working version of the prep3 code (i.e. a working version of Salaried Employee, Hourly Employee, Company) and must create at least one Salaried Employee or Hourly Employee. You must NOT access any private variables. There are no other requirements for the test cases. You can verify whether your test cases are acceptable by running the automated tests on Markus. TODO: Implement *at least* 2 more test cases to test your code. Sample test cases below == === Use the below test cases as an example for writing your own test cases, and as a start to testing your prep3.py code. WARNING: THIS IS CURRENTLY AN EXTREMELY INCOMPLETE SET OF TESTS! We will test your code on a much more thorough set of tests! WITYMA def test_total_pay_basic() -> None: e = Salaried Employee (14, 'Gilbert the cat', 1200.0) e.pay (date (2018, 6, 28)) e.pay (date (2018, 7, 28)) e.pay (date (2018, 8, 28)) assert e.total_pay() def test_total_payroll_mixed () -> None: my_corp = Company ( [Salaried Employee (24, 'Gilbert the cat', 1200.0), HourlyEmployee (25, 'Chairman Meow', 500.25, 1.0)]) my_corp.pay_all(date (2018, 6, 28)) assert my_corp.total_payroll() if name import pytest == 300.0 _main__' == 600.25 pytest.main(['prep3_starter_tests.py'])
Expert Answer:
Answer rating: 100% (QA)
Solution Here are two more test cases that you can use Python def testemployeepayroll Test the payroll calculation for a salaried employee employee Sa... View the full answer
Related Book For
Core Concepts Of Accounting Information Systems
ISBN: 9780470507025
11th Edition
Authors: Nancy A. Bagranoff, Mark G. Simkin, Carolyn Strand Norman
Posted Date:
Students also viewed these programming questions
-
2. (35 points) Suppose you visited a bank to get a loan in the amount of $10,000. You negotiated the terms of the loan with the bank and the re-payment plan is finalized as follows: Effective Monthly...
-
THIRD AVENUE SOFTWARE HEALTH-CARE APP PROJECT This case is new for the ninth edition of Information Technology Project Management . The case provides an opportunity to apply agile and Scrum...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
101, 115, 143, 106, 100, 142, 157, 163, 155, 141, 145, 153, 152, 147, 143, 115, 164, 160, 147, 150 (90%) Find the confidence interval of the median, indicated in parentheses, for the set of data.
-
Fair Value Addison Manufacturing holds a large portfolio of debt and equity securities as an investment. The fair value of the portfolio is greater than its original cost, even though some securities...
-
If you have been able to leave the bromine-cyclohexane and bromine-cyclohexene mixtures from Part 1 in the comboplate® until the end of the lesson, answer the questions which follow: i. What do...
-
You try to push a heavy box along the floor while you are dressed in socks, but your feet keep slipping. When you put on some shoes, your feet no longer slip, and you are able to do work on the box...
-
The foreign currency is the functional currency for a foreign subsidiary. At what exchange rate should each of the following accounts be translated? a. Rent Expense. b. Dividends. c. Equipment. d....
-
1 What is HRM? Explain the Functions of HRM? 2 What is HRP? Explain the process of HRP? 3 4 5 6 7 What is Recruitment? Explain the factors affecting Recruitment. What are the different Sources of...
-
Jackson's Vacuum company makes two types of vacuums: Basic and Advanced. The factory is set up into 3 working departments. Both vacuums utilize process #1 to assemble the basic components. Those...
-
Consider the following economic events. a. Political turmoil in the Middle East causes oil prices to skyrocket, acting as a negative supply shock on the US economy. This negative supply shock makes...
-
What are the types of errors that can be made in hypothesis testing? Which type of error is generally regarded as more serious?
-
Suppose a random variable Y is best described by a uniform distribution with a = 3 and b = 32. (a) Find f(y). (b) Find F(y). (c) Find the mean and variance of Y.
-
Suppose a random variable X is best described by a uniform distribution with a = 8 and b = 20. (a) Find f(x). (b) Find F(x). (c) Find the mean and variance of X.
-
An art dealer at an auction believes that the bid on a certain painting will be a uniformly distributed random variable between $500 and $2,000. (a) What is the probability density function for this...
-
Suppose the cost of sampling is 50 cents per observation. If the population has zero variance, large a sample should be collected to estimate mean of the population?
-
Q10) The vector function whose graph on the right of the plane curve together with the position vector r(t) and the tangent vector r '(t) for t=-1 is: a) r(t) = (4t-5,-2) c) r(t) = (-t-2,4t+5) c)...
-
Outline some of the major problems confronting an international advertiser.
-
Describe the meaning of each of the entity-relationship diagrams shown inFigure. Student Number Name Address Student b. Sales account representative has Customens C. Credit card is assigned PIN...
-
Dick Hammaker has been fascinated with Corvette cars, especially convertibles, since he was a teenager. Dick grew up in Michigan and worked part-time through his high school and college years at a...
-
What is the relationship between XBRL and IDEA?
-
Consider an EPR state \(|\phiangle_{A B}\); Alice measures the spin on \(z\), then Bob measures it on \(x\), and then Alice measures it again on \(z\). Classify the possible answers for the second...
-
Explore whether the original Bell inequality can be violated at large angles as well.
-
Instead of the Bell-CHSH inequality in the text, consider an inequality obtained in the same way from \(\tilde{M}=\left(A+A^{\prime} ight) B^{\prime}+\left(A-A^{\prime} ight) B\) instead of \(M\). Is...
Study smarter with the SolutionInn App