Skip to content

Commit 85ff849

Browse files
committed
Merge pull request #17 from msabramo/use_version.py_in_dunder_init
Use version.py file in __init__.py to be more DRY
2 parents 9d14ec7 + c90b897 commit 85ff849

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pytest_httpbin/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import pytest
22

3-
__version__ = '0.0.3'
3+
with open("pytest_httpbin/version.py") as f:
4+
code = compile(f.read(), "pytest_httpbin/version.py", 'exec')
5+
exec(code)
46

57
use_class_based_httpbin = pytest.mark.usefixtures("class_based_httpbin")
68
use_class_based_httpbin_secure = pytest.mark.usefixtures("class_based_httpbin_secure")

0 commit comments

Comments
 (0)