conftest.py 237 B

12345678910111213141516
  1. import os
  2. import pytest
  3. def clean_db():
  4. db_path = os.path.expanduser("~/.embedchain/embedchain.db")
  5. if os.path.exists(db_path):
  6. os.remove(db_path)
  7. @pytest.fixture
  8. def setup():
  9. clean_db()
  10. yield
  11. clean_db()