I have a Python script.
A particular method takes a text file and may creates0-3 files.
I have sample text files, and the expected output files for each.
How would I set up this script for testing?
I  use unittest for testing functions that do not have file i/o currently.

SampleInputFile1 -> expect 0 files generated.
SampleInputFile2 -> expect 1 files generated with specific output.
SampleInputFile3 -> expect 3 files generated, each with specific output.

I want to ensure all three sample files, expected files are generated with expected content. Testing script question
maybe I dont understand the question but you use a program to divide a text into different subtexts?
Why dont you use train_test_split from sklearn to get the test and training files,
sklearn.model_selection.train_test_split(*arrays, test_size=None, train_size=None, random_state=None, shuffle=True, stratify=None)
How do I test Python with test files and expected output files