Skip to main content

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*

11
  • 2
    possible duplicate of Unit testing - one test is partly a "superset" of another, is this wrong? Commented Jan 12, 2015 at 15:41
  • 2
    @GlenH7 - this seems like a different question. The other is "if you have functions where A calls B and returns the same result, should you test both A and B". This is more about the tests being overlapping rather than the function(s) under test. (Though it's confusing as they're currently named). Commented Jan 12, 2015 at 15:46
  • possible duplicate of How should I test the functionality of a function that uses other functions in it? Commented Jan 12, 2015 at 17:03
  • 1
    Stricly speaking these tests aren't really overlapping (they don't have success dependency). A function lambda: type('', (), {'__len__': lambda self: 2})() will pass the first, but not the second. Commented Jan 12, 2015 at 19:40
  • 1
    @GlenH7: FWIW, I did not really change the question, just tried to make it gnat-safe ;-) (@gnat: no offense, just joking!) Commented Jan 13, 2015 at 16:02