packaging and testing
This commit is contained in:
30
gwendolynTest.py
Normal file
30
gwendolynTest.py
Normal file
@ -0,0 +1,30 @@
|
||||
import unittest
|
||||
|
||||
import funcs
|
||||
|
||||
class testSwChar(unittest.TestCase):
|
||||
def testNewChar(self):
|
||||
text1, result = funcs.parseChar("TestUser","")
|
||||
self.assertEqual(result,"Character for TestUser created")
|
||||
|
||||
def testChangeName(self):
|
||||
text1, result = funcs.parseChar("TestUser","name TestChar")
|
||||
self.assertEqual(result,"Changed TestChar's Name to TestChar")
|
||||
|
||||
def testChangeChar(self):
|
||||
text1, result = funcs.parseChar("TestUser","characteristics brawn 1")
|
||||
self.assertEqual(result,"Changed New Character's Characteristics")
|
||||
|
||||
def testDelChar(self):
|
||||
text1, result = funcs.parseChar("TestUser","purge")
|
||||
self.assertEqual(result,"Character for TestUser deleted")
|
||||
|
||||
|
||||
class testGwendolynFuncs(unittest.TestCase):
|
||||
def testCap(self):
|
||||
self.assertEqual(funcs.cap("planet of the apes"),"Planet of the Apes")
|
||||
self.assertEqual(funcs.cap("the greatest showman"),"The Greatest Showman")
|
||||
self.assertEqual(funcs.cap("i'm the best person!"),"I'm the Best Person!")
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
Reference in New Issue
Block a user