You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
- 2Possible duplicate of Testing private methods as protectedGreg Burghardt– Greg Burghardt2018-10-19 15:26:27 +00:00Commented Oct 19, 2018 at 15:26
- 3OP, where did you hear or read that testing of private methods was considered "bad"? There are different ways to unit test. See Unit testing, Black-box testing and White-box testing.John Wu– John Wu2018-10-19 20:34:48 +00:00Commented Oct 19, 2018 at 20:34
- @JohnWu: I know the difference between White-box and Black-box testing. But even in White-box testing it looks like the need to test private methods is a hint for a design problem. My question is an attempt to understand what are the best paths when I fall there...Serge Ballesta– Serge Ballesta2018-10-22 07:41:47 +00:00Commented Oct 22, 2018 at 7:41
- 2Again, where did you hear or read that even in White-box testing the need to test private methods is a hint for a design problem? I would like to understand the reasoning behind that belief before attempting an answer.John Wu– John Wu2018-10-22 07:57:50 +00:00Commented Oct 22, 2018 at 7:57
- @SergeBallesta in other words, put some references to those articles that made you believe that testing private methods is a bad practice. Then explain to us why did you believe them.Laiv– Laiv2018-10-22 12:13:04 +00:00Commented Oct 22, 2018 at 12:13
| Show 6 more comments
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you
lang-py