typeshed-internal / stub_uploader

Scripts and actions to auto-upload typeshed stubs to PyPI
Apache License 2.0
21 stars 16 forks source link

Integration tests access files outside stub_upload dir #115

Closed srittau closed 8 months ago

srittau commented 10 months ago

Currently, the integration tests access and modify files outside its own directory, namely in ../typeshed. This is dangerous as a user's files could be modified or overwritten. It also doesn't clean up after itself, causing subsequent integration test runs to fail.

I would suggest that the integration tests check out a local shallow copy of typeshed, either into /tmp or a local test directory, and delete it after use.

srittau commented 8 months ago

Basically the same issue as #121, where I analyze the problem in more depth, and offer an easier and better solution.