| Conditions | 4 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | from msquaredc.project import Project |
||
| 13 | def test_cleanup(func): |
||
| 14 | def call(*args,**kwargs): |
||
| 15 | try: |
||
| 16 | os.remove(func.__name__) |
||
| 17 | except (PermissionError,FileNotFoundError,WindowsError): |
||
| 18 | pass |
||
| 19 | try: |
||
| 20 | res = func(*args, file=func.__name__,**kwargs) |
||
| 21 | finally: |
||
| 22 | try: |
||
| 23 | os.remove(func.__name__) |
||
| 24 | except (PermissionError, FileNotFoundError,WindowsError): |
||
| 25 | pass |
||
| 26 | return res |
||
| 27 | return call |
||
| 28 | |||
| 44 |