14 lines
343 B
Python
14 lines
343 B
Python
from __future__ import annotations
|
|
|
|
import importlib
|
|
|
|
import pytest
|
|
|
|
snapshot = importlib.import_module("backup_tool.snapshot")
|
|
|
|
|
|
def test_empty_source_requires_explicit_opt_in() -> None:
|
|
with pytest.raises(snapshot.SnapshotError, match="source_empty"):
|
|
snapshot.require_nonempty([], False)
|
|
snapshot.require_nonempty([], True)
|