Skip to content

Commit

Permalink
rephrase warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener committed Jan 6, 2025
1 parent c2ad400 commit fa7d515
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/log-mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def main() -> None:

# Illustrate warnings/logging capture
if uniform(0, 1) < 0.05:
warn("Oof. Something went awry.", stacklevel=2)
warn("test warning to test warnings capture", stacklevel=2)

if istep == 16:
logger.warning("test logging")
Expand Down
2 changes: 1 addition & 1 deletion examples/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def main() -> None:

# Illustrate warnings capture
if uniform(0, 1) < 0.05:
warn("Oof. Something went awry.", stacklevel=2)
warn("test warning to test warnings capture", stacklevel=2)

if istep == 50:
logger.warning("test logging")
Expand Down
2 changes: 1 addition & 1 deletion test/test_logManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_empty_on_init(basic_logmgr: LogManager):

def test_basic_warning():
with pytest.warns(UserWarning):
warn("Oof. Something went awry.", UserWarning, stacklevel=2)
warn("test warning to test warnings capture", UserWarning, stacklevel=2)


def test_warnings_capture_from_warnings_module(basic_logmgr: LogManager):
Expand Down

0 comments on commit fa7d515

Please sign in to comment.