Running unit tests on nested functions

后端 未结 6 2033
野的像风
野的像风 2020-12-16 17:32

I come from the Java world, where you can hide variables and functions and then run unit tests against them using reflection. I have used nested functions to hide implement

6条回答
  •  离开以前
    2020-12-16 18:18

    The Python convention is to name "private" functions and methods with a leading underscore. When you see a leading underscore, you know not to try and use it.

    Remember, Python is not Java.

提交回复
热议问题