예제 #1
0
 def test_get_members_names_no_exclude_hidden(self):
     obj = TestObject()
     members = list(reflection.get_member_names(obj, exclude_hidden=False))
     members = [member for member in members if not member.startswith("__")]
     self.assertEqual(["_hello", "hi"], sorted(members))
예제 #2
0
 def test_get_members_names_exclude_hidden(self):
     obj = TestObject()
     members = list(reflection.get_member_names(obj, exclude_hidden=True))
     self.assertEqual(["hi"], members)
예제 #3
0
 def test_get_members_names_exclude_hidden(self):
     obj = TestObject()
     members = list(reflection.get_member_names(obj, exclude_hidden=True))
     self.assertEqual(["hi"], members)
예제 #4
0
 def test_get_members_names_no_exclude_hidden(self):
     obj = TestObject()
     members = list(reflection.get_member_names(obj, exclude_hidden=False))
     members = [member for member in members if not member.startswith("__")]
     self.assertEqual(["_hello", "hi"], sorted(members))