PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: './instance/test_db.sqlite'
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: './instance/test_db.sqlite' Question: I’m having a trouble with tear down of my pytest context. I have a Flask app which creates sqlite3 database in my instance directory, looks like this: # ./src/app_factory/__init__.py def create_app(): app = Flask(__name__, instance_path=f'{os.path.abspath("instance")}’, instance_relative_config=True, …