Coverage for /var/srv/projects/api.amasfac.comuna18.com/tmp/venv/lib/python3.9/site-packages/PIL/_util.py: 85%

11 statements  

« prev     ^ index     » next       coverage.py v6.4.4, created at 2023-07-17 14:22 -0600

1import os 

2from pathlib import Path 

3 

4 

5def is_path(f): 

6 return isinstance(f, (bytes, str, Path)) 

7 

8 

9def is_directory(f): 

10 """Checks if an object is a string, and that it points to a directory.""" 

11 return is_path(f) and os.path.isdir(f) 

12 

13 

14class DeferredError: 

15 def __init__(self, ex): 

16 self.ex = ex 

17 

18 def __getattr__(self, elt): 

19 raise self.ex