A quick query to all. What in your opinion turns a unit test into an integration test? Is it only when it involves a call to some external API. Is it if it calls another function? Say I have the following, with it worth noting I work mainly with equations and mathematical constructs where these functions will produce very specific answers that are hard to determine from their inputs:
def my_function(): a = a_long_function() b = another_long_function() if a > b: etc…
Would mocking an and b change the level of this test vs directly calculating with the actually functions. Would you think it would be any different if the code was written in an OOP manners vs a functional manner?
submitted by /u/Loud-Worker8179
[link] [comments]
r/learnpython A quick query to all. What in your opinion turns a unit test into an integration test? Is it only when it involves a call to some external API. Is it if it calls another function? Say I have the following, with it worth noting I work mainly with equations and mathematical constructs where these functions will produce very specific answers that are hard to determine from their inputs: def my_function(): a = a_long_function() b = another_long_function() if a > b: etc… Would mocking an and b change the level of this test vs directly calculating with the actually functions. Would you think it would be any different if the code was written in an OOP manners vs a functional manner? submitted by /u/Loud-Worker8179 [link] [comments]
A quick query to all. What in your opinion turns a unit test into an integration test? Is it only when it involves a call to some external API. Is it if it calls another function? Say I have the following, with it worth noting I work mainly with equations and mathematical constructs where these functions will produce very specific answers that are hard to determine from their inputs:
def my_function(): a = a_long_function() b = another_long_function() if a > b: etc…
Would mocking an and b change the level of this test vs directly calculating with the actually functions. Would you think it would be any different if the code was written in an OOP manners vs a functional manner?
submitted by /u/Loud-Worker8179
[link] [comments]