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