Exemplo n.º 1
0
    def test_none_error(self):
        with self.assertRaises(TypeError):
            library_name_format('none')

        with self.assertRaises(TypeError):
            library_name_format(None)
Exemplo n.º 2
0
    def test_number_start_error(self):
        with self.assertRaises(TypeError):
            library_name_format('1thing')

        with self.assertRaises(TypeError):
            library_name_format('1')
Exemplo n.º 3
0
 def test_empty_error(self):
     with self.assertRaises(TypeError):
         library_name_format('')
Exemplo n.º 4
0
 def test_ok(self):
     lib = 'libName'
     self.assertEqual('libName', library_name_format(lib))
Exemplo n.º 5
0
    def test_space_error(self):
        with self.assertRaises(TypeError):
            library_name_format(' ')

        with self.assertRaises(TypeError):
            library_name_format('thing thing')
Exemplo n.º 6
0
 def test_underscore_error(self):
     with self.assertRaises(TypeError):
         library_name_format('thing_thing')
Exemplo n.º 7
0
 def test_comma_error(self):
     with self.assertRaises(TypeError):
         library_name_format('thing,thing')
Exemplo n.º 8
0
 def test_semicolon_error(self):
     with self.assertRaises(TypeError):
         library_name_format('thing;thing')