File tree Expand file tree Collapse file tree 3 files changed +41
-1
lines changed
Expand file tree Collapse file tree 3 files changed +41
-1
lines changed Original file line number Diff line number Diff line change 7070 - name : Test | Run pytest
7171 run : ${{ inputs.run-test-command }}
7272
73+ - name : Test | Run End-to-End App Test
74+ run : ./tests/e2e_test_app.py
75+
76+ - name : Test | Check End-to-End Test Results
77+ run : [ "$(wc -l < e2e-test-app-stderr.log)" -eq 3 ] && [ "$(wc -l < e2e-test-logfile.log)" -eq 3 ] && [ ! -s "e2e-test-logfile_root.log" ]
Original file line number Diff line number Diff line change 55
66
77def create_dict_config (
8- logfile : Path ,
8+ logfile : Path | str ,
99 app_name : str ,
1010 console_log_level : str | int = "WARNING" ,
1111 file_log_level : str | int = "DEBUG" ,
1212 console_handler_factory : Callable = StreamHandler ,
1313 file_handler_factory : Callable = FileHandler ,
1414) -> dict [str , str ]:
15+ logfile = Path (logfile )
1516 console_log_level = _checkLevel (console_log_level )
1617 file_log_level = _checkLevel (file_log_level )
1718 min_level = getLevelName (min (console_log_level , file_log_level ))
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env -S uv run --script
2+ #
3+ # /// script
4+ # requires-python = ">=3.11"
5+ # dependencies = [
6+ # "readylog",
7+ # ]
8+ #
9+ # [tool.uv.sources]
10+ # readylog = { path = "..", editable = true }
11+ # ///
12+
13+ from logging import getLogger
14+ from logging .config import dictConfig
15+
16+ from readylog import create_dict_config
17+ from readylog .decorators import debug
18+
19+ logging_configuration = create_dict_config (
20+ "e2e-test-logfile.log" , "e2e-test-app" , console_log_level = "DEBUG"
21+ )
22+ dictConfig (logging_configuration )
23+
24+ logger = getLogger (__name__ )
25+
26+
27+ @debug
28+ def greet (greeting : str , name : str ) -> None :
29+ return f"{ greeting .title ()} , { name .title ()} "
30+
31+
32+ logger .debug ("e2e-test-app runs" )
33+
34+ greet ("hello" , "world" )
You can’t perform that action at this time.
0 commit comments