]> git.openstreetmap.org Git - nominatim.git/commitdiff
add pytest-asyncio as a requirement for testing
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 29 Jan 2023 08:53:42 +0000 (09:53 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 30 Jan 2023 08:36:17 +0000 (09:36 +0100)
.github/workflows/ci-tests.yml
docs/develop/Development-Environment.md

index 93cd9119431926500499af809b2f114bfc9dd298..1f6f1bb7924b2df05ef7607d13237091c54b4e7f 100644 (file)
@@ -99,11 +99,15 @@ jobs:
               if: (matrix.flavour == 'oldstuff') || (matrix.flavour == 'ubuntu-22')
 
             - name: Install test prerequsites (from apt for Ununtu 2x)
-              run: sudo apt-get install -y -qq python3-pytest uvicorn
+              run: sudo apt-get install -y -qq python3-pytest python3-pytest-asyncio uvicorn
               if: matrix.flavour != 'oldstuff'
 
+            - name: Install newer pytest-asyncio
+              run: pip3 install -U pytest-asyncio
+              if: matrix.flavour == 'ubuntu-20'
+
             - name: Install test prerequsites (from pip for Ubuntu 18)
-              run: pip3 install pytest uvicorn
+              run: pip3 install pytest pytest-asyncio uvicorn
               if: matrix.flavour == 'oldstuff'
 
             - name: Install Python webservers
@@ -123,7 +127,6 @@ jobs:
             - name: PHP unit tests
               run: phpunit ./
               working-directory: Nominatim/test/php
-              if: ${{ (matrix.ubuntu == 20) || (matrix.ubuntu == 22) }}
 
             - name: Python unit tests
               run: python3 -m pytest test/python
index 4bba30db12683a56bad76f4563384012a6628b05..4c678aa69cf4e9eff9be648eaa3b8e49310f5090 100644 (file)
@@ -36,6 +36,7 @@ It has the following additional requirements:
 * [mypy](http://mypy-lang.org/) (plus typing information for external libs)
 * [Python Typing Extensions](https://github.com/python/typing_extensions) (for Python < 3.9)
 * [pytest](https://pytest.org)
+* [pytest-asyncio](https://pytest-asyncio.readthedocs.io)
 
 For testing the Python search frontend, you need to install extra dependencies
 depending on your choice of webserver framework:
@@ -62,7 +63,7 @@ To install all necessary packages run:
 sudo apt install php-cgi phpunit php-codesniffer \
                  python3-pip python3-setuptools python3-dev
 
-pip3 install --user behave mkdocs mkdocstrings pytest pylint \
+pip3 install --user behave mkdocs mkdocstrings pytest pytest-asyncio pylint \
                     mypy types-PyYAML types-jinja2 types-psycopg2 types-psutil \
                     types-ujosn types-requests typing-extensions\
                     sanic-testing httpx asgi-lifespan