Buckets:

download
raw
750 Bytes
"""Tests for ``cli.delete``."""
import subprocess
import pytest
import calkit
def test_rm_question(tmp_dir):
subprocess.check_call(["calkit", "init"])
subprocess.check_call(["calkit", "new", "question", "First question?"])
subprocess.check_call(["calkit", "new", "question", "Second question?"])
assert calkit.load_calkit_info()["questions"] == [
"First question?",
"Second question?",
]
# Remove the first (1-indexed)
subprocess.check_call(["calkit", "rm", "question", "1"])
assert calkit.load_calkit_info()["questions"] == ["Second question?"]
# Out-of-range index fails
with pytest.raises(subprocess.CalledProcessError):
subprocess.check_call(["calkit", "rm", "question", "5"])

Xet Storage Details

Size:
750 Bytes
·
Xet hash:
ce616f11942b84766430899971fba30ebf013b6b5dfe6eabde63091fbbaaa004

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.