Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdelorenzo committed Jul 7, 2021
1 parent f42c5bb commit d12fa9c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
5 changes: 5 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import annotations
from pathlib import Path, PurePath
from os import PathLike

Expand All @@ -8,6 +9,10 @@
from aiopath import AsyncPath


RECURSIVE_GLOB: str = '**/*'
WILDCARD_GLOB: str = '*'


PathTypes = PathLike | str
Paths = tuple[Path, AsyncPath]

Expand Down
6 changes: 1 addition & 5 deletions tests/test_aiopath.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env pytest
from __future__ import annotations
from pathlib import Path, PurePath
from asyncio import sleep, to_thread
Expand All @@ -17,9 +16,6 @@
TEST_NAME: str = 'TEST'
TEST_SUFFIX: str = f'.{TEST_NAME}'
TOUCH_SLEEP: int = 1
RECURSIVE_GLOB: str = '**/*'
WILDCARD_GLOB: str = '*'
NO_PATHS: int = 0


@pytest.mark.asyncio
Expand Down Expand Up @@ -139,9 +135,9 @@ async def test_unlink(file_paths: Paths, dir_paths: Paths):
# recreate file
await apath.touch()

# can't unlink dirs
path, apath = dir_paths

assert await apath.exists() == path.exists()
assert await apath.exists()
assert path.exists()

Expand Down
6 changes: 2 additions & 4 deletions tests/test_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
from aiopath import AsyncPath, AsyncPurePath
import pytest

from . import _test_is, _test_is_io, _test_is_pure, \
file_paths, dir_paths, Paths, PathTypes, get_paths
from . import file_paths, dir_paths, Paths, PathTypes, \
get_paths, RECURSIVE_GLOB, WILDCARD_GLOB


RECURSIVE_GLOB: str = '**/*'
WILDCARD_GLOB: str = '*'
NO_PATHS: int = 0


Expand Down

0 comments on commit d12fa9c

Please sign in to comment.