Exemplo n.º 1
0
class PydiceTest(unittest.TestCase):
    def setUp(self):
        self.py = Pydice()

    def test_roll(self):
        "tests the roll() function of pydice.py"
        # test roll is an int
        self.assertIsInstance(self.py.roll(), int)
        # test roll is 6 or below
        self.assertGreater(7, self.py.roll())
        # test roll is greater than 0
        self.assertLess(0, self.py.roll())
Exemplo n.º 2
0
class PydiceTest(unittest.TestCase):
	def setUp(self):
		self.py = Pydice() 

	def test_roll(self):
		"tests the roll() function of pydice.py"
		# test roll is an int
		self.assertIsInstance(self.py.roll(), int)
		# test roll is 6 or below
		self.assertGreater(7, self.py.roll())
		# test roll is greater than 0
		self.assertLess(0, self.py.roll())
Exemplo n.º 3
0
 def setUp(self):
     self.py = Pydice()
Exemplo n.º 4
0
	def setUp(self):
		self.py = Pydice()