Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def assert_qualname(self, func, qn, check_actual_qualname=True):
qualname = Source.for_filename(__file__).code_qualname(func.__code__)
self.assertEqual(qn, qualname)
if PY3 and check_actual_qualname:
self.assertEqual(qn, func.__qualname__)
self.assertTrue(qn.endswith(func.__name__))