Hacker News new | past | comments | ask | show | jobs | submit login

"You just need to click around until your code hits the point in the code (or, ideally, run an integration test that gets you to that point) where you want the ability to run methods, inspect objects, etc."

This is generally a lot less effort than populating objects in the REPL to reproduce the same set of conditions.




That's basically an admission that you're not writing enough realistic tests or your dev environment is set up wrong.

For me, it's way way easier the other way around.


Ahh the classic "you're doing it wrong" reply with no advice on why it is wrong.


Do you need advice on why creating a code base not surrounded by realistic & reliable tests is a suboptimal approach?

Or did you think that once they're there it would still be a lot of effort to use them to populate objects?


Doesn't mean that its going to catch the bugs that are present. An IDE when properly setup is closer to a production system than a load of unit tests and as such will be able to fix far more bugs in my opinion.

But you are welcome to do what works for you. Maybe you work on something more suited to your approach. My approach works better for what I do.


I write integration tests, as I mentioned in the first post and realistic ones as mentioned in the second. I try not to write unit tests because, as you mentioned, they are unrealistic (among other reasons), and unrealistic tests tend not to catch bugs.

That said, a high level 'unit test' (e.g. one that manufactures a request and checks its response) is often realistic enough and works pretty well with IPython.embed().




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: