Skip to content

Commit 6170b1d

Browse files
committed
Make Unit Tests a little more efficient
1 parent 3bd4012 commit 6170b1d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/tests/test_output.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# ## Python StdLib Imports ----
1414
import logging
1515
from collections.abc import Generator
16+
from functools import lru_cache
1617
from typing import Literal, Union
1718
from unittest import TestCase
1819

@@ -184,6 +185,7 @@ def _pass_fixtures(self, capsys: pytest.CaptureFixture) -> None:
184185
self.capsys: pytest.CaptureFixture = capsys
185186

186187
@staticmethod
188+
@lru_cache
187189
def get_list_of_words(num_words: int = 100) -> str_list:
188190
word_url = "https://www.mit.edu/~ecprice/wordlist.10000"
189191
response: requests.Response = requests.get(word_url)

0 commit comments

Comments
 (0)