In [1]:
from Module_unittest import del_parenthesis, del_quote

In [2]:
del_parenthesis('hello (world)')


Out[2]:
'hello world'

In [9]:
del_quote('maybe "not"')


Out[9]:
'maybe not'

In [4]:
import unittest

In [12]:
class MyTest(unittest.TestCase):
    def test1(self):
        self.assertEqual(del_parenthesis('hello (world)'), 'hello world')
    
    def test2(self):
        self.assertTrue('(' not in del_parenthesis('hello (world)'))
        self.assertTrue(')' not in del_parenthesis('hello (world)'))

    def test3(self):
        self.assertEqual(del_quote('maybe "not"'), 'maybe not')
    
    def test4(self):
        self.assertTrue('"' not in del_quote('maybe "not"'))
        self.assertTrue("'" not in del_quote('maybe "not"'))

In [13]:
suite = unittest.TestLoader().loadTestsFromTestCase(MyTest)

In [14]:
unittest.TextTestRunner(verbosity=2).run(suite)


test1 (__main__.MyTest) ... ok
test2 (__main__.MyTest) ... ok
test3 (__main__.MyTest) ... ok
test4 (__main__.MyTest) ... ok

----------------------------------------------------------------------
Ran 4 tests in 0.001s

OK
Out[14]:
<unittest.runner.TextTestResult run=4 errors=0 failures=0>

In [ ]: