I want to test my code and I need to create some directories in it. I tried using:
def test_something(pytester): pytester.makepyfile("foobar123") pytester.makepyfile(custom="foobar1234") print(pytester.path)
But these files are created in the temporary directory. I need to create the files inside the test folder of the project, in a folder with a specific name (for example ‘test-output’). How can I solve this using a similar approach?
Source: Python Questions