def test_fail_count_files(self): self._extract_structure() try: reusables.count_files(test_root, ext={"ext": ".cfg"}) except TypeError: pass else: raise AssertionError("Should raise type error")
def test_count_name(self): self._extract_structure() resp = reusables.count_files(test_root, name="file_") assert resp == 4, reusables.find_files_list(test_root, name="file_", abspath=True)
def test_count_files(self): self._extract_structure() resp = reusables.count_files(test_root, ext=".cfg") assert resp == 1, resp