def test_case_change(self): s = 'CamelCaseStringWITHCAPS' e = 'camelcasestringwithcaps' r = rt._sanitize(s) self.assertEqual(r, e)
def test_drop_parens(self): s = 'string with (units)' e = 'string_with' r = rt._sanitize(s) self.assertEqual(r, e)
def test_everything(self): s = 'He:CO2 Pressure (torr)' e = 'heco2_pressure' r = rt._sanitize(s) self.assertEqual(r, e)
def test_remove_spaces(self): s = 'string with spaces two' e = 'string_with_spaces__two' r = rt._sanitize(s) self.assertEqual(r, e)