2021-04-10 19:15:20 +00:00
|
|
|
"""Test if everything is installed correctly"""
|
|
|
|
|
|
|
|
import quicktex
|
|
|
|
|
|
|
|
|
2022-05-23 01:40:13 +00:00
|
|
|
class TestInstall:
|
2022-04-10 05:20:09 +00:00
|
|
|
def test_version(self):
|
|
|
|
"""Test if the extension module version matches what setuptools returns"""
|
|
|
|
try:
|
|
|
|
from importlib import metadata
|
|
|
|
except ImportError:
|
|
|
|
# Python < 3.8, so we cant get the metadata, so just check if it exists
|
|
|
|
assert quicktex.__version__
|
|
|
|
print(f'Cannot check version in python < 3.8. __version__ is {quicktex.__version__}')
|
|
|
|
return
|
2021-04-10 19:15:20 +00:00
|
|
|
|
2022-04-10 05:20:09 +00:00
|
|
|
version = metadata.version('quicktex')
|
2021-04-10 19:15:20 +00:00
|
|
|
|
2022-04-10 05:20:09 +00:00
|
|
|
assert version == quicktex.__version__, 'incorrect version string from extension module'
|