Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

test_environment.py 632 B

You have to be logged in to leave a comment. Sign In
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
  1. import sys
  2. REQUIRED_PYTHON = "python3"
  3. def main():
  4. system_major = sys.version_info.major
  5. if REQUIRED_PYTHON == "python":
  6. required_major = 2
  7. elif REQUIRED_PYTHON == "python3":
  8. required_major = 3
  9. else:
  10. raise ValueError("Unrecognized python interpreter: {}".format(
  11. REQUIRED_PYTHON))
  12. if system_major != required_major:
  13. raise TypeError(
  14. "This project requires Python {}. Found: Python {}".format(
  15. required_major, sys.version))
  16. else:
  17. print(">>> Development environment passes all tests!")
  18. if __name__ == '__main__':
  19. main()
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...