I had an interview a few weeks ago (one of like 3 this year) where it was revealed they still write these.
They asked how we kept all the stuff organized at my last job. All the cucumber stuff. I said we just kept the tests next to the file they’re testing- foo.py has a sibling test_foo.py- and we didn’t find much value in adding extra layers. If you want to test the API returns 403 when you request another user’s file, you can just write like
I had an interview a few weeks ago (one of like 3 this year) where it was revealed they still write these.
They asked how we kept all the stuff organized at my last job. All the cucumber stuff. I said we just kept the tests next to the file they’re testing- foo.py has a sibling test_foo.py- and we didn’t find much value in adding extra layers. If you want to test the API returns 403 when you request another user’s file, you can just write like
def test_403_when_requesting_other_user_file() -> None: response = requests.get("whatever/etc") assert response.status_code == 403You can be pretty to the point.
We used docstrings to explain non-obvious things. Swagger shows the API docs in a nice webpage for anyone curious and authorized.
He wasn’t impressed and I didn’t make it to the next round.
Poor Stockholm syndrome afflicted fool
Breaks my heart to know people are still suffering this particular hell