Quacken8 / MagneticDisconnectSimulator

Python simulator of disconnection of solar magnetic field from its roots inpsired by Schüssler and Rempel (2018)
1 stars 0 forks source link

Removing files and folders #5

Closed mejroslav closed 1 year ago

mejroslav commented 1 year ago

https://github.com/Quacken8/MagneticDisconnectSimulator/blob/faef3bd8e65fb5808206e7455553f4014a215acd/UnitTests.py#L25-L26

Isn't this dangerous? If not, you can use os.rmdir() method.

Quacken8 commented 1 year ago

I don't believe it is becuse the unit test won't overwrite an existing folder with its temporary one and only removes the one it creates.

os.rmdir() for some reason doesn't support recursive deletion IIRC