I am using pytest. I have two files in a directory. In one of the files there is a long running test case that generates some output. In the other file there is a test case that reads that output. How can I ensure the proper execution order of the two test cases? Is there any alternative other than puting the test cases in the same file in the proper order?
Make Sure you have installed pytest-ordering package.
To confirm go to Pycharm settings>>Project Interpreter >> and look for pytest-ordering : 
If it is not available install it.
Pycharm settings>>Project Interpreter >>  Click on + button and search pytest-ordering install it.
Voila!! It will definitely work.
Test case execution order in pytest