def test_dir_here(self): dir_here = Path.dir_here(__file__) assert dir_here.basename == "tests"
# -*- coding: utf-8 -*- import pytest from pathlib_mate.pathlib2 import Path dir_tests = Path.dir_here(__file__) dir_project_root = dir_tests.parent dir_pathlib_mate = Path(dir_project_root, "pathlib_mate") dir_app = Path(dir_tests, "app") p_this = Path(__file__).absolute() def clear_all_zip_file_in_tests_dir(): for p in dir_tests.select_by_ext(".zip"): p.remove_if_exists() def setup_module(module): clear_all_zip_file_in_tests_dir() def teardown_module(module): clear_all_zip_file_in_tests_dir() class TestToolBoxZip(object): def test_auto_zip_archive_dst(self): p = dir_pathlib_mate._default_zip_dst() assert p.dirpath == dir_pathlib_mate.dirpath p = p_this._default_zip_dst()