File tree Expand file tree Collapse file tree 3 files changed +26
-2
lines changed
Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -571,6 +571,14 @@ configuration = airflow_client.client.Configuration(
571571)
572572```
573573
574+ * Run scheduler (or dag file processor you have setup with standalone dag file processor) for few parsing
575+ loops (you can pass --num-runs parameter to it or keep it running in the background). The script relies
576+ on example DAGs being serialized to the DB and this only
577+ happens when scheduler runs with `` core/load_examples `` set to True.
578+
579+ * Run webserver - reachable at the host/port for the test script you want to run. Make sure it had enough
580+ time to initialize.
581+
574582Run ` python test_python_client.py ` and you should see colored output showing attempts to connect and status.
575583
576584
Original file line number Diff line number Diff line change @@ -65,12 +65,11 @@ Homepage = "https://airflow.apache.org/"
6565[tool .hatch .envs .test ]
6666dependencies = [
6767 " pytest-cov>=2.8.1" ,
68- " python_dateutil >= 2.5.3" ,
6968 " urllib3 >= 1.25.3" ,
7069]
7170
7271[tool .hatch .envs .test .scripts ]
73- run-coverage = " pytest --cov-config=pyproject.toml --cov=airflow_client test --color=yes "
72+ run-coverage = " pytest test"
7473run = " run-coverage --no-cov"
7574
7675[[tool .hatch .envs .test .matrix ]]
@@ -103,3 +102,18 @@ artifacts = [
103102include = [
104103 " /airflow_client" ,
105104]
105+
106+ [tool .pytest .ini_options ]
107+ # make sure that pytest.ini is not read from pyproject.toml in paraent directories
108+ addopts = " --color=yes --cov-config=pyproject.toml --cov=airflow_client"
109+ norecursedirs = [
110+ ]
111+ log_level = " INFO"
112+ filterwarnings = [
113+ ]
114+ python_files = [
115+ " test_*.py" ,
116+ ]
117+ testpaths = [
118+ " test" ,
119+ ]
Original file line number Diff line number Diff line change 2626
2727from __future__ import annotations
2828
29+ import sys
2930import uuid
3031
3132import airflow_client .client
124125
125126 if errors :
126127 print ("\n [red]There were errors while running the script - see above for details" )
128+ sys .exit (1 )
127129 else :
128130 print ("\n [green]Everything went well" )
You can’t perform that action at this time.
0 commit comments