You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test failure while trying to os.remove a file that had not yet been closed.
What I Did
While running tests with tox, got the following error:
data = open(pipfile.name).read()
> os.remove(pipfile.name)
E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\ptmcg\\AppData\\Local\\Temp\\tmpwetzvkjv'
FAILED tests/test_updater.py::test_update_pipfile - PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\ptmcg\\AppData\...
Fixed by changing the "data.open(pipfile.name).read()" line in dparse/updater.py to:
with open(pipfile.name) as pf:
data = pf.read()
pipfile.close()
The text was updated successfully, but these errors were encountered:
Description
Test failure while trying to os.remove a file that had not yet been closed.
What I Did
While running tests with tox, got the following error:
Fixed by changing the "data.open(pipfile.name).read()" line in dparse/updater.py to:
The text was updated successfully, but these errors were encountered: