(tmpdir: Path)
| 146 | |
| 147 | |
| 148 | def test_templates_with_directory(tmpdir: Path) -> None: |
| 149 | path = os.path.join(tmpdir, "index.html") |
| 150 | with open(path, "w") as file: |
| 151 | file.write("Hello") |
| 152 | |
| 153 | templates = Jinja2Templates(directory=str(tmpdir)) |
| 154 | template = templates.get_template("index.html") |
| 155 | assert template.render({}) == "Hello" |
| 156 | |
| 157 | |
| 158 | def test_templates_with_environment(tmpdir: Path, test_client_factory: TestClientFactory) -> None: |
nothing calls this directly
no test coverage detected