# Why did a question about unit-testing get migrated?

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.

## 1 Answer

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.

• 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. – user3610360 Aug 6 '15 at 19:37
• 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. – user3610360 Aug 6 '15 at 19:46
• @user3610360: I wasn't the one who migrated it, but I'm sure this was a reason why it was. – Jamal Aug 6 '15 at 19:49
• 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. – user3610360 Aug 6 '15 at 19:51
• @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. – Jamal Aug 6 '15 at 20:01
• 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. – user3610360 Aug 6 '15 at 20:03