Skip to content

Commit

Permalink
Fix unit tests for Python 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Delgan committed Apr 28, 2023
1 parent 28749e7 commit 455808b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_datetime.py
Expand Up @@ -158,9 +158,9 @@ def test_freezegun_mocking(writer):


@pytest.mark.parametrize(
"format", ["ss.SSSSSSS", "SS.SSSSSSSS.SS", "HH:mm:ss.SSSSSSSSS", "SSSSSSSSSS"]
"time_format", ["ss.SSSSSSS", "SS.SSSSSSSS.SS", "HH:mm:ss.SSSSSSSSS", "SSSSSSSSSS"]
)
def test_invalid_time_format(writer, format):
logger.add(writer, format=f"{{time:{format}}} {{message}}", catch=False)
def test_invalid_time_format(writer, time_format):
logger.add(writer, format="{time:%s} {message}" % time_format, catch=False)
with pytest.raises(ValueError, match="Invalid time format"):
logger.info("Test")

0 comments on commit 455808b

Please sign in to comment.