Example #1
0
 def test_string__with_whitespace(self):
     self.assertFalse(__unit__.has_identifier_form('foo bar'))
     self.assertFalse(__unit__.has_identifier_form('foo\tbar'))
Example #2
0
 def test_string__underscore_prefix(self):
     self.assertTrue(__unit__.has_identifier_form('_42'))
Example #3
0
 def test_string__letters(self):
     self.assertTrue(__unit__.has_identifier_form('foo'))
Example #4
0
 def test_string__empty(self):
     self.assertFalse(__unit__.has_identifier_form(''))
Example #5
0
 def test_string__number_prefix(self):
     self.assertFalse(__unit__.has_identifier_form('42foo'))
Example #6
0
 def test_some_object(self):
     with self.assertRaises(TypeError):
         __unit__.has_identifier_form(object())
Example #7
0
 def test_some_object(self):
     with self.assertRaises(TypeError):
         __unit__.has_identifier_form(object())
Example #8
0
 def test_string__camel_case(self):
     self.assertTrue(__unit__.has_identifier_form('FooBar'))
     self.assertTrue(__unit__.has_identifier_form('fooBar'))
Example #9
0
 def test_string__snake_case(self):
     self.assertTrue(__unit__.has_identifier_form('foo_bar'))
Example #10
0
 def test_string__letters(self):
     self.assertTrue(__unit__.has_identifier_form('foo'))
Example #11
0
 def test_string__with_whitespace(self):
     self.assertFalse(__unit__.has_identifier_form('foo bar'))
     self.assertFalse(__unit__.has_identifier_form('foo\tbar'))
Example #12
0
 def test_string__underscore_prefix(self):
     self.assertTrue(__unit__.has_identifier_form('_42'))
Example #13
0
 def test_string__number_prefix(self):
     self.assertFalse(__unit__.has_identifier_form('42foo'))
Example #14
0
 def test_string__empty(self):
     self.assertFalse(__unit__.has_identifier_form(''))
Example #15
0
 def test_string__camel_case(self):
     self.assertTrue(__unit__.has_identifier_form('FooBar'))
     self.assertTrue(__unit__.has_identifier_form('fooBar'))
Example #16
0
 def test_none(self):
     with self.assertRaises(TypeError):
         __unit__.has_identifier_form(None)
Example #17
0
 def test_string__snake_case(self):
     self.assertTrue(__unit__.has_identifier_form('foo_bar'))
Example #18
0
 def test_none(self):
     with self.assertRaises(TypeError):
         __unit__.has_identifier_form(None)