From 9b7da0cfa14aefc9e1dc5cd11dd39ccc0fd5d84a Mon Sep 17 00:00:00 2001 From: Jasper Date: Tue, 25 Jul 2023 22:12:59 +0200 Subject: [PATCH] Dropped some WIP tests, to be added back with full functionality later. --- pyproject.toml | 2 +- tests/test_main.py | 48 +--------------------------------------------- 2 files changed, 2 insertions(+), 48 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index df1d3c8..66475f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "libretro-finder" -version = "0.1.2" +version = "0.1.3" description = "Command line utility that looks for specific BIOS files for libretro cores and, if found, refactors them to the expected format (i.e. name and directory structure)." authors = ["Jasper "] license = "GNU General Public License v3.0" diff --git a/tests/test_main.py b/tests/test_main.py index 656013f..38a9a42 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -126,50 +126,4 @@ def test_same_input( assert len(output_paths) == current_len assert bios_lut.shape[0] == len(output_paths) assert np.all(np.isin(output_hashes, bios_lut["md5"].values)) - assert np.all(np.isin(bios_lut["name"].values, output_names)) - - # def test_permissions( - # self, setup_files, tmpdir_factory: TempdirFactory, monkeypatch: MonkeyPatch - # ) -> None: - # bios_dir, bios_lut = setup_files - # assert bios_dir.exists() - - # # checking saved files (excluding directories) - # file_paths = list(bios_dir.rglob("*")) - # file_paths = [file_path for file_path in file_paths if file_path.is_file()] - # assert len(file_paths) == TEST_SAMPLE_SIZE - - # # making output_dir but with read-only permissions - # temp_dir = tmpdir_factory.mktemp("test_permissions") - # output_dir = pathlib.Path(temp_dir) - # print(stat.filemode(os.stat(str(temp_dir)).st_mode)) - # os.chmod(str(temp_dir), 0o555) - # print(stat.filemode(os.stat(str(temp_dir)).st_mode)) - - # # checking if currently empty - # output_paths = list(output_dir.rglob(pattern="*")) - # assert len(output_paths) == 0 - - # # swapping out system_df to the one generated from setup_files - # # this is needed because we can't include actual bios files for testing - # monkeypatch.setattr("libretro_finder.main.system_df", bios_lut) - # organize(search_dir=bios_dir, output_dir=output_dir, glob="*") - # output_dir - - # # verifying correct output - # output_paths = list(output_dir.rglob(pattern="*")) - # output_paths = [ - # output_path for output_path in output_paths if output_path.is_file() - # ] - # output_names = [ - # output_path.relative_to(output_dir).as_posix() - # for output_path in output_paths - # ] - # output_hashes = [hash_file(output_path) for output_path in output_paths] - - # assert len(output_paths) == TEST_SAMPLE_SIZE - # assert bios_lut.shape[0] == len(output_paths) - # assert np.all(np.isin(output_hashes, bios_lut["md5"].values)) - # assert np.all(np.isin(bios_lut["name"].values, output_names)) - - # def test_argparser \ No newline at end of file + assert np.all(np.isin(bios_lut["name"].values, output_names)) \ No newline at end of file