title: testing function in python that need to get input from user and print the output, using pycharm and pytest
body: <p>I wrote code in python 3, and want to write tests to my code using the Pytest framework. 
  I have one function (the main function) that gets input from the user(a file name), processes it and prints a result to the screen(the answer can be true or false).
  How can I write a test function that inputs data by herself(for the main input) and check what printed to the console? (I use Pycharm) </p>