Rotary Logger  1.0.2
The middleware rotary logger
Loading...
Searching...
No Matches
tests.test_control_functions Namespace Reference

Functions

 test_start_stop_registers_and_unregisters_atexit (Path tmp_path)
 
 test_pause_and_resume_toggle (Path tmp_path)
 
 _toggle_pause_resume (RotaryLogger rl, threading.Event stop_event)
 
 test_concurrent_pause_resume_stress (Path tmp_path)
 
 test_pause_logging_toggle_false_always_pauses (Path tmp_path)
 
 test_resume_logging_toggle_true_pauses_when_active (Path tmp_path)
 
 test_is_redirected_reflects_logging_state (Path tmp_path)
 
 test_rotary_logger_callable_starts_logging (Path tmp_path)
 
 test_stop_logging_clears_stdin_stream (Path tmp_path)
 

Detailed Description

# +==== BEGIN rotary_logger =================+
# LOGO: 
# ..........####...####..........
# ......###.....#.#########......
# ....##........#.###########....
# ...#..........#.############...
# ...#..........#.#####.######...
# ..#.....##....#.###..#...####..
# .#.....#.##...#.##..##########.
# #.....##########....##...######
# #.....#...##..#.##..####.######
# .#...##....##.#.##..###..#####.
# ..#.##......#.#.####...######..
# ..#...........#.#############..
# ..#...........#.#############..
# ...##.........#.############...
# ......#.......#.#########......
# .......#......#.########.......
# .........#####...#####.........
# /STOP
# PROJECT: rotary_logger
# FILE: test_control_functions.py
# CREATION DATE: 02-11-2025
# LAST Modified: 3:41:37 04-03-2026
# DESCRIPTION: 
# A module that provides a universal python light on iops way of logging to files your program execution.
# /STOP
# COPYRIGHT: (c) Asperguide
# PURPOSE: File in charge of testing the control functions that provide status and information.
# // AR
# +==== END rotary_logger =================+

Function Documentation

◆ _toggle_pause_resume()

tests.test_control_functions._toggle_pause_resume ( RotaryLogger rl,
threading.Event stop_event )
protected

Definition at line 88 of file test_control_functions.py.

◆ test_concurrent_pause_resume_stress()

tests.test_control_functions.test_concurrent_pause_resume_stress ( Path tmp_path)

Definition at line 95 of file test_control_functions.py.

◆ test_is_redirected_reflects_logging_state()

tests.test_control_functions.test_is_redirected_reflects_logging_state ( Path tmp_path)
is_redirected() should return False before and after stop_logging, True during.

Definition at line 156 of file test_control_functions.py.

◆ test_pause_and_resume_toggle()

tests.test_control_functions.test_pause_and_resume_toggle ( Path tmp_path)

Definition at line 66 of file test_control_functions.py.

◆ test_pause_logging_toggle_false_always_pauses()

tests.test_control_functions.test_pause_logging_toggle_false_always_pauses ( Path tmp_path)
pause_logging(toggle=False) should always pause, even if already paused.

Definition at line 125 of file test_control_functions.py.

◆ test_resume_logging_toggle_true_pauses_when_active()

tests.test_control_functions.test_resume_logging_toggle_true_pauses_when_active ( Path tmp_path)
resume_logging(toggle=True) should pause when the logger is currently running.

Definition at line 142 of file test_control_functions.py.

◆ test_rotary_logger_callable_starts_logging()

tests.test_control_functions.test_rotary_logger_callable_starts_logging ( Path tmp_path)
Calling the RotaryLogger instance like a function should start logging.

Definition at line 173 of file test_control_functions.py.

◆ test_start_stop_registers_and_unregisters_atexit()

tests.test_control_functions.test_start_stop_registers_and_unregisters_atexit ( Path tmp_path)

Definition at line 47 of file test_control_functions.py.

◆ test_stop_logging_clears_stdin_stream()

tests.test_control_functions.test_stop_logging_clears_stdin_stream ( Path tmp_path)
stop_logging should restore sys.stdin and clear stdin_stream.

Definition at line 187 of file test_control_functions.py.