Replaced custom deprecated decorator with simple DeprecationWarning (#2110)

This commit is contained in:
@Antelox
2025-02-16 16:04:42 +01:00
committed by GitHub
parent bf5e335269
commit 8d52ece48b
2 changed files with 15 additions and 31 deletions

View File

@@ -1,14 +1,18 @@
import regress
import sys
import unittest
from unicorn import *
from unicorn.x86_const import *
# Very basic testing to ensure the old api exists
# and we correctly implement __deprecated
@unittest.skipIf(sys.version_info < (3, 7), reason="requires python3.7 or higher")
class OldCtl(regress.RegressTest):
def runTest(self):
mu = Uc(UC_ARCH_X86, UC_MODE_32)
mu.ctl_tlb_mode(UC_TLB_CPU)
mu.ctl_set_tlb_mode(UC_TLB_VIRTUAL)
if __name__ == '__main__':
regress.main()