[tests] Add compat2core_tests.py
[tests] Add compat2core_tests.py

Bug: T193968
Change-Id: I6218a200fbee183dca97d01de9bdf49f0845e75b

wikimedia/pywikibot-core,PersianWikipedia/pywikibot-core,wikimedia/pywikibot-core