| Conditions | 4 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | from msquaredc.project import Project |
||
| 4 | def test_cleanup(func): |
||
| 5 | def call(*args,**kwargs): |
||
| 6 | try: |
||
| 7 | os.remove(func.__name__) |
||
| 8 | except (PermissionError,FileNotFoundError): |
||
| 9 | pass |
||
| 10 | try: |
||
| 11 | res = func(*args, file=func.__name__,**kwargs) |
||
| 12 | finally: |
||
| 13 | try: |
||
| 14 | os.remove(func.__name__) |
||
| 15 | except (PermissionError, FileNotFoundError): |
||
| 16 | pass |
||
| 17 | return res |
||
| 18 | return call |
||
| 19 | |||
| 35 |