예제 #1
0
def test_is_upper_camel():
    for word in UPPER_CAMEL:
        assert is_upper_camel(word)
        assert is_upper_camel('_' + word)
        assert not is_upper_camel('__' + word)
        assert not is_upper_camel(word + '_')
    for word in LOWER_SNAKE:
        assert not is_upper_camel(word)
        assert not is_upper_camel('_' + word)
        assert not is_upper_camel(word + '_')
예제 #2
0
 def test_is_upper_camel(self):
   for word in self.UPPER_CAMEL:
     self.assertTrue(is_upper_camel(word))
     self.assertTrue(is_upper_camel('_' + word))
     self.assertFalse(is_upper_camel('__' + word))
     self.assertFalse(is_upper_camel(word + '_'))
   for word in self.LOWER_SNAKE:
     self.assertFalse(is_upper_camel(word))
     self.assertFalse(is_upper_camel('_' + word))
     self.assertFalse(is_upper_camel(word + '_'))
예제 #3
0
def test_is_upper_camel():
  for word in UPPER_CAMEL:
    assert is_upper_camel(word)
    assert is_upper_camel('_' + word)
    assert not is_upper_camel('__' + word)
    assert not is_upper_camel(word + '_')
  for word in LOWER_SNAKE:
    assert not is_upper_camel(word)
    assert not is_upper_camel('_' + word)
    assert not is_upper_camel(word + '_')