After reading about testing private methods in Python, specifically referring to this accepted answer, it appears that it is best to just test the public interface. However, my class looks like this:
class MyClass:
  def __init__(self):
    # init code
  def run(self):
    self.__A()
    self.__B()
    self.__C()
    self.__D()
  def __A(self):
    # code for __A
  def __B(self):
    # code for __B
  def __C(self):
    # code for __C
  def __D(self):
    # code for __D
Essentially, I created a class to process some input data through a pipeline of functions. In this case, it would be helpful to test each private function in turn, without exposing them as public functions. How does one go about this, if a unit test can't execute the private function?
 
     
     
     
    