#!/usr/bin/make -f

# The tests cannot run against Flask 3.x: flask_mongoengine/json.py imports
# flask.json.JSONEncoder, which was removed in Flask 3.x, so importing the
# package (and thus running pytest) fails. Skip the test suite.
export DEB_BUILD_OPTIONS := $(DEB_BUILD_OPTIONS) nocheck

# addopts as specified in setup.cfg generates test coverage reports, which we
# do not care about. Also skip test_multiple_connections as it expects to be
# able to connect to a mongo server.
export PYBUILD_TEST_ARGS=--override-ini=addopts=--verbose tests/test_base.py tests/test_connection.py -k 'not test_multiple_connections'

export PYBUILD_NAME=flask-mongoengine
%:
	dh $@ --with python3 --buildsystem=pybuild
