How to unit test a python method with double underscore?

  pytest, python, unit-testing

I’m trying to write a unit test for a python class that has a method similar to this:

@staticmethod
def __some_method():
    doSomething...

The issue I’m facing is that the __some_method doesn’t show up in the unit test file. Is there a way around this?

Source: Python Questions

LEAVE A COMMENT