Lab12 - PA1 Unit Tests

Videos for explanation of Cant Stop:


2) Our version:

Here is a starting point for Part A of the project. Two example assert statements are provided for each test function. You should add at least three more to each function, so that every requirement of the project is tested.

Note: Docstrings are generally not required for test functions. But you should still have a module docstring with your name and date.

""" - test the dice module.

@author: Alvin Chao
@version: 3-21-24
I got help from TA Madison on the valid tests.
import unittest
import dice

class TestDice(unittest.TestCase):

    def test_roll_dice_valid(self):
        expected = [4]
        actual = dice.roll_dice(1,0)
        self.assertEqual(expected, actual, "1-0")

    def test_roll_dice_invalid(self):

    def test_are_valid_valid(self):

    def test_are_valid_invalid(self):

if __name__ == '__main__':

Also here are some stubs for the dice module:

""" PA1-

@author: Alvin Chao
@version: 3-21-24
I got help from TA Marshall on the invalid tests.

def roll_dice(num, seed):
    my_dice = []
    return my_dice

def are_valid(dice):
    return True