Esempio 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())
Esempio 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())
Esempio n. 3
0
 def setUp(self):
     self.py = Pydice()
Esempio n. 4
0
	def setUp(self):
		self.py = Pydice()