Files
pydantic/tests/test_version.py
T
Pax 68784f63c0 fix: provide __version__ attribute (#2573)
* fix: provide __version__ attribute

Pyinstaller is giving an error packaging a script that uses pydantic, "AttributeError: Module 'pydantic' has no attribute '__version__'"

See Issue #2572

* chore: add md file in changes folder

* test: __version__ attribute of pydantic module
2021-05-09 13:44:55 +01:00

10 lines
196 B
Python

import pydantic
def test_version_attribute_is_present():
assert hasattr(pydantic, '__version__')
def test_version_attribute_is_a_string():
assert isinstance(pydantic.__version__, str)