Skip to content

Commit

Permalink
Remove utc fixture from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
finnagin committed Jul 18, 2022
1 parent 0c574f7 commit a7c1fe3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/unit/test_base_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


@pytest.fixture
def fixed_time(utc: None) -> Iterator[None]:
def fixed_time() -> Iterator[None]:
with patch("time.time", lambda: 1547704837.040001 + time.timezone):
yield

Expand Down
10 changes: 5 additions & 5 deletions tests/unit/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def make_record(self, msg: str, level_name: str) -> logging.LogRecord:
("CRITICAL", "ERROR: hello\nworld"),
],
)
def test_format(self, level_name: str, expected: str, utc: None) -> None:
def test_format(self, level_name: str, expected: str) -> None:
"""
Args:
level_name: a logging level name (e.g. "WARNING").
Expand All @@ -63,7 +63,7 @@ def test_format(self, level_name: str, expected: str, utc: None) -> None:
],
)
def test_format_with_timestamp(
self, level_name: str, expected: str, utc: None
self, level_name: str, expected: str
) -> None:
record = self.make_record("hello\nworld", level_name=level_name)
f = IndentingFormatter(fmt="%(message)s", add_timestamp=True)
Expand All @@ -77,7 +77,7 @@ def test_format_with_timestamp(
("CRITICAL", "DEPRECATION: hello\nworld"),
],
)
def test_format_deprecated(self, level_name: str, expected: str, utc: None) -> None:
def test_format_deprecated(self, level_name: str, expected: str) -> None:
"""
Test that logged deprecation warnings coming from deprecated()
don't get another prefix.
Expand All @@ -89,7 +89,7 @@ def test_format_deprecated(self, level_name: str, expected: str, utc: None) -> N
f = IndentingFormatter(fmt="%(message)s")
assert f.format(record) == expected

def test_thread_safety_base(self, utc: None) -> None:
def test_thread_safety_base(self) -> None:
record = self.make_record(
"DEPRECATION: hello\nworld",
level_name="WARNING",
Expand All @@ -106,7 +106,7 @@ def thread_function() -> None:
thread.join()
assert results[0] == results[1]

def test_thread_safety_indent_log(self, utc: None) -> None:
def test_thread_safety_indent_log(self) -> None:
record = self.make_record(
"DEPRECATION: hello\nworld",
level_name="WARNING",
Expand Down

0 comments on commit a7c1fe3

Please sign in to comment.