path = 'tests/test_core.cpp'
with open(path, 'r', encoding='utf-8') as f:
    c = f.read()
target = 'CHECK(pExplore.priority == bot_priority::EXPLORE, "Priority phai la 4000");'
repl = 'std::cout << "DEBUG: pExplore.priority=" << pExplore.priority << " vs " << bot_priority::EXPLORE << " name=" << pExplore.priorityName << std::endl; CHECK(pExplore.priority == bot_priority::EXPLORE, "Priority phai la 4000");'
c = c.replace(target, repl, 1)
with open(path, 'w', encoding='utf-8') as f:
    f.write(c)
print('Replaced target with debug print')
