forked from azavea/python-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_environment.py
More file actions
29 lines (23 loc) · 757 Bytes
/
test_environment.py
File metadata and controls
29 lines (23 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import sys
REQUIRED_PYTHON = "python3"
def test_python_geospatial():
# TODO: implement this
pass
def test_python_version():
system_major = sys.version_info.major
if REQUIRED_PYTHON == "python":
required_major = 2
elif REQUIRED_PYTHON == "python3":
required_major = 3
else:
raise ValueError("Unrecognized python interpreter: {}".format(
REQUIRED_PYTHON))
if system_major != required_major:
raise TypeError(
"This project requires Python {}. Found: Python {}".format(
required_major, sys.version))
else:
print(">>> Development environment passes all tests!")
if __name__ == '__main__':
test_python_geospatial()
test_python_version()