agritheory / test_utils

Common Test Utilities and Fixtures for AgriTheory Projects
4 stars 4 forks source link

Export `conftest.py` boilerplate so it can be synchronized across repos #3

Closed agritheory closed 7 months ago

MyuddinKhatri commented 7 months ago

@agritheory @Alchez This issue says export conftest.py boilerplate, but conftest.py in other apps uses frappe and this app test_utils is not a frappe app, should we add frappe as a dependency, or just export the boilerplate as a string?

agritheory commented 7 months ago

I think there's a third option where we test for the import and error if it doesn't exist.


try:
  import frappe
  ... # more imports
except ModuleNotFoundError as e: # might not be the right exception, I'm guessing
  raise ModuleNotFoundError('Frappe is not installed')