diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8943a74..d2a890c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -56,7 +56,7 @@ jobs: - name: Run pytest run: | - poetry run pytest --cov=./ --cov-report=xml + poetry run pytest --cov=flask_htmx --cov-report=xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v2 diff --git a/README.rst b/README.rst index 3cbf5fe..c437fa9 100644 --- a/README.rst +++ b/README.rst @@ -110,6 +110,20 @@ Installation poetry install +Running tests +------------- + +.. code-block:: bash + + poetry run pytest + +Coverage +-------- + +.. code-block:: bash + + poetry run pytest --cov=flask_htmx tests/ + Docs ---- diff --git a/run.py b/run.py deleted file mode 100644 index 1175963..0000000 --- a/run.py +++ /dev/null @@ -1,20 +0,0 @@ -from flask import Flask, render_template -from flask_htmx import HTMX - -app = Flask(__name__) -htmx = HTMX() -htmx.init_app(app) - - -@app.route("/") -def home(): - print("Home route.") - if htmx: - print("It was a HTMX request.") - else: - print("It was NOT a HTMX request.") - return render_template("index.html") - - -if __name__ == "__main__": - app.run(debug=True)