Context
Suppose one a repository folder named some_repo, with a test file named test_something.py in directory some_repo/tests/ which contains a test class named class Test_something(unittest.TestCase): which has a test named: def test_four(self):. This test_four(self) calls quite a few functions from a few other files in the repository.
Question
Is it possible to copy the minimum amount of files, functions and classes from repo a that are required to run the test_four(self) test from the test_something.py file, from repository a into another folder b with a single command?
Analogy
Kind of like pulling a single thread in a clothing outfit, and getting that entire piece of clothing, without the rest of the outfit.
Approach
My first guess would be to remove all other test files, and the __main__.py file and to run Vulture, however, that seems slightly convoluted, and in my experience Vulture often needs some human guidance.