mirror of
https://codeberg.org/cblanken/boggler.git
synced 2026-07-26 03:29:26 -04:00
Use pathlib to handle paths instead of os.path
- Replaces all instances of os.path objects with pathlib.Path
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
import unittest
|
||||
from functools import reduce
|
||||
from itertools import chain
|
||||
from os import path
|
||||
from pathlib import Path
|
||||
import pytest
|
||||
from boggler.boggler_utils import BoggleBoard, build_full_boggle_tree
|
||||
|
||||
WORDLISTS_DIR = path.abspath("./boggler/wordlists/dwyl/")
|
||||
WORDLISTS_DIR = Path("./boggler/wordlists/dwyl/").absolute()
|
||||
|
||||
@pytest.fixture
|
||||
def board_4x4():
|
||||
@@ -122,7 +120,7 @@ def board_4(board_4x4):
|
||||
|
||||
@pytest.fixture
|
||||
def tree_4(board_4):
|
||||
return build_full_boggle_tree(board_4, WORDLISTS_DIR)
|
||||
return build_full_boggle_tree(board_4, Path(WORDLISTS_DIR))
|
||||
|
||||
@pytest.fixture
|
||||
def found_words_4(tree_4):
|
||||
|
||||
Reference in New Issue
Block a user