(tmp_path)
| 81 | |
| 82 | @pytest.fixture |
| 83 | def data_dir(tmp_path): |
| 84 | data_dir = tmp_path / "data_dir" |
| 85 | data_dir.mkdir() |
| 86 | with open(data_dir / "train.txt", "w") as f: |
| 87 | f.write("foo\n" * 10) |
| 88 | with open(data_dir / "test.txt", "w") as f: |
| 89 | f.write("bar\n" * 10) |
| 90 | return str(data_dir) |
| 91 | |
| 92 | |
| 93 | @pytest.fixture |