Download fixtures/pattern_lab/tests/test_notes.py from tailot/codex-python: direct link, hf CLI and curl.
- Browser
- Download file 432 Bytes
-
https://huggingface.co/datasets/tailot/codex-python/resolve/main/fixtures/pattern_lab/tests/test_notes.py
- Command line
-
hf download hf://datasets/tailot/codex-python/fixtures/pattern_lab/tests/test_notes.py
-
curl -L -o test_notes.py https://huggingface.co/datasets/tailot/codex-python/resolve/main/fixtures/pattern_lab/tests/test_notes.py
432 Bytes
| """Tests for src.notes.""" | |
| from src.notes import read_note, write_note | |
| def test_write_then_read_round_trip(tmp_path) -> None: | |
| path = tmp_path / "note.txt" | |
| body = "first line\nsecond line\n" | |
| assert write_note(path, body) == len(body) | |
| assert read_note(path) == body | |
| def test_read_note_of_an_empty_file(tmp_path) -> None: | |
| path = tmp_path / "empty.txt" | |
| write_note(path, "") | |
| assert read_note(path) == "" | |