diff tests/test-ancestor.py @ 50928:d718eddf01d9

safehasattr: drop usage in favor of hasattr The two functions should now be equivalent at least in their usage in core.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 31 Aug 2023 23:56:15 +0200
parents 003c0732c055
children 493034cc3265
line wrap: on
line diff
--- a/tests/test-ancestor.py	Thu Dec 08 15:33:19 2022 +0100
+++ b/tests/test-ancestor.py	Thu Aug 31 23:56:15 2023 +0200
@@ -12,7 +12,6 @@
     debugcommands,
     hg,
     ui as uimod,
-    util,
 )
 
 
@@ -416,7 +415,7 @@
     for i, (dag, tests) in enumerate(dagtests):
         repo = hg.repository(u, b'gca%d' % i, create=1)
         cl = repo.changelog
-        if not util.safehasattr(cl.index, 'ancestors'):
+        if not hasattr(cl.index, 'ancestors'):
             # C version not available
             return