| 253 | |
| 254 | @pytest.fixture |
| 255 | def complex_data_dir(tmp_path): |
| 256 | data_dir = tmp_path / "complex_data_dir" |
| 257 | data_dir.mkdir() |
| 258 | (data_dir / "data").mkdir() |
| 259 | with open(data_dir / "data" / "train.txt", "w") as f: |
| 260 | f.write("foo\n" * 10) |
| 261 | with open(data_dir / "data" / "test.txt", "w") as f: |
| 262 | f.write("bar\n" * 10) |
| 263 | with open(data_dir / "README.md", "w") as f: |
| 264 | f.write("This is a readme") |
| 265 | with open(data_dir / ".dummy", "w") as f: |
| 266 | f.write("this is a dummy file that is not a data file") |
| 267 | return str(data_dir) |
| 268 | |
| 269 | |
| 270 | @pytest.mark.parametrize( |