I am using VScode with python code and I have a folder with sub-directories (2-levels deep) containing python tests. 
When I try "Python: Discover Tests" it asks for a test framework (selected pytest) and the directory in which tests exist. At this option, it shows only the top-level directories and does not allow to select a sub-directory. 
I tried to type the directory path but it does not accept it. 
Can someone please help on how to achieve this?
Try opening the "Output" log (Ctrl+Shift+U) and run "Python: Discover Tests". Alternatively, you may type pytest --collect-only into the console. Maybe you are experiencing some errors with the tests themselves (such as importing errors).
Also, make sure to keep __init__.py file in your "tests" folder.
I am keeping the pytest "tests" folder within a subdirectory, and there are no issues with VS Code discovering the tests.
How do I select a sub-folder as a directory containing tests in Python extension for Visual studio code