Closed nipunn1313 closed 3 years ago
For example this unit test might be useful for #24
I used a couple of real-life test cases (toml and aio). I considered contriving the test cases, but figured it'll be more likely to catch regressions w/ real-life test cases.
I feel like the test files are a bit too much, it will make people think they need to update these stubs or otherwise get confused by them. What do you think of using mostly empty example files instead? It doesn't seem like the stub uploader would care what is in the files.
sure - I can make the test cases slimmer and contrived. One sec. Didn't think about the subsequent developer confusion.
There it is - much simpler diff
Have to add some sorting to the unit tests so it runs consistently on different platforms.
(oops - sorry, stepped on your feet while you were running the workflow - sorry)
Realized while writing the unit test that I had only covered singlefile pkgs - so I added coverage and unit test for a multifile pkg with gitignore.
Don't worry about it, happy to keep pushing the button to allow the workflow to run.
All complete now!
I found that while I was testing this script, it would crash if I had a typeshed file open in my editor. This fixes that, and adds some missing tests for the file collection method (which will be handy later as well).