Exemple #1
0
 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")
Exemple #2
0
 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")
Exemple #3
0
 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)
Exemple #4
0
 def test_count_files(self):
     self._extract_structure()
     resp = reusables.count_files(test_root, ext=".cfg")
     assert resp == 1, resp
Exemple #5
0
 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)
Exemple #6
0
 def test_count_files(self):
     self._extract_structure()
     resp = reusables.count_files(test_root, ext=".cfg")
     assert resp == 1, resp