4
\$\begingroup\$

I'm curious as to why this question got migrated to Stack Overflow, mostly so I can ask in the correct place in the future. It's about unit testing a functioning python module, the unit tests all succeed and are viable tests of the functionality but were not (still are not) elegant. Why is Code Review not the correct spot for such a question?

To be clear, this is not in the least hypothetical code, it's for a story in current sprint against which I'm making commits.

\$\endgroup\$
5
\$\begingroup\$

It was migrated because it contained hypothetical content. This was indicated by the vagueness of the question as well as generic names such as do_something(). Such questions are off-topic as we only review real code with sufficient context. More information about that can be found here.

\$\endgroup\$
  • \$\begingroup\$ I am not sure what was vague about the question, other than the name of the method call at the bottom of the loop ("do_something"). The point of the question was about unit testing the method itself, so having the correct method call at the end seems irrelevant. What other vague-ness did you see as problematic? It was not at all a hypothetical, it's very much code I'm working on actively and have used contributions from code review to improve. \$\endgroup\$ – user3610360 Aug 6 '15 at 19:37
  • \$\begingroup\$ Just for my understanding, it wasn't the fact that the question was about unit tests that caused it to get migrated, but that you thought I was asking about a hypothetical situation. \$\endgroup\$ – user3610360 Aug 6 '15 at 19:46
  • 1
    \$\begingroup\$ @user3610360: I wasn't the one who migrated it, but I'm sure this was a reason why it was. \$\endgroup\$ – Jamal Aug 6 '15 at 19:49
  • \$\begingroup\$ Could you suggest edits or a different approach to wording so that I can avoid my questions appearing to be hypothetical in the future. Or point out details of the question that cause you to think it's hypothetical? I appreciate the feedback. \$\endgroup\$ – user3610360 Aug 6 '15 at 19:51
  • 1
    \$\begingroup\$ @user3610360: Make sure you only post your real code as it appears. Chances are such code won't have a function such as do_something(). As for wording, describe the code itself and what you want out of a review. Something like "method that iterates through loops" is too generic and doesn't say anything about the real code. \$\endgroup\$ – Jamal Aug 6 '15 at 20:01
  • \$\begingroup\$ thank you for the feedback, will keep in mind. The do_something method name was indeed a place-holder which has since been updated but I see why it should have been fixed before I posted. \$\endgroup\$ – user3610360 Aug 6 '15 at 20:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .