cleanup #18
1 changed files with 7 additions and 6 deletions
|
|
@ -1,24 +1,27 @@
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import pytest
|
|
||||||
from pytest_abra.dir_manager import DirManager
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
from pytest_abra.dir_manager import DirManager
|
||||||
|
|
||||||
|
|
||||||
def test_get_latest_session_id_from_non_existing_dir(tmp_path: Path):
|
def test_get_latest_session_id_from_non_existing_dir(tmp_path: Path):
|
||||||
out = DirManager.get_latest_session_id(tmp_path / "not_exist")
|
out = DirManager.get_latest_session_id(tmp_path / "not_exist")
|
||||||
assert out is None
|
assert out is None
|
||||||
|
|
||||||
|
|
||||||
def test_get_latest_session_id_from_empty_dir(tmp_path: Path):
|
def test_get_latest_session_id_from_empty_dir(tmp_path: Path):
|
||||||
out = DirManager.get_latest_session_id(tmp_path)
|
out = DirManager.get_latest_session_id(tmp_path)
|
||||||
assert out is None
|
assert out is None
|
||||||
|
|
||||||
|
|
||||||
def test_get_latest_session_id_single(tmp_path: Path):
|
def test_get_latest_session_id_single(tmp_path: Path):
|
||||||
(tmp_path / "a").mkdir()
|
(tmp_path / "a").mkdir()
|
||||||
out = DirManager.get_latest_session_id(tmp_path)
|
out = DirManager.get_latest_session_id(tmp_path)
|
||||||
assert out == "a"
|
assert out == "a"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.slow
|
@pytest.mark.slow
|
||||||
def test_get_latest_session_id(tmp_path: Path):
|
def test_get_latest_session_id(tmp_path: Path):
|
||||||
(tmp_path / "a").mkdir()
|
(tmp_path / "a").mkdir()
|
||||||
|
|
@ -26,5 +29,3 @@ def test_get_latest_session_id(tmp_path: Path):
|
||||||
(tmp_path / "b").mkdir()
|
(tmp_path / "b").mkdir()
|
||||||
out = DirManager.get_latest_session_id(tmp_path)
|
out = DirManager.get_latest_session_id(tmp_path)
|
||||||
assert out == "b"
|
assert out == "b"
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue