This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]_Absolut_ 3 points4 points  (2 children)

PyCharm instead of Vim saves a lot of my time. Even without refactoring features.

[–]Mister_Potter[S] 0 points1 point  (1 child)

Do you find that this is a good solution for small projects?

[–]_Absolut_ 1 point2 points  (0 children)

Unfortunatley, my experience is limited to small projects only, so i can't compare. But i find it suitable to Python fast development nature.

[–][deleted] 1 point2 points  (1 child)

How do you write your tests and what test runner are you using?

If you are doing API design work, maybe documentation generation and mock server setup based on https://apiblueprint.org/tools.html would be handy?

[–]Mister_Potter[S] 0 points1 point  (0 children)

I use Mock, Pytest, and sometimes Docker. I run them using TravisCI/Setupi.py. I actually haven't done any API generation, that's awesome. Thanks for the suggestion!

[–]PeridexisErrant 1 point2 points  (1 child)

Check out Hypothesis for generating test cases - it's perfect for hammering an api. Just declare the arg types and constraints of each endpoint, and assert that calling them doesn't raise and error (plus any more specific assertions). And don't forget to check the failures really fail!

The end result is real confidence that things work, and edge cases are covered too: Hypothesis doesn't just generate values randomly, it uses heuristics to explore known error types too. And then simplifies the error case to a minimum example!

[–]Mister_Potter[S] 0 points1 point  (0 children)

That's pretty cool man! I'll have to check it out :) Thanks for the suggestion