This commit is contained in:
Fabian Joswig 2025-04-28 19:44:55 +00:00 committed by GitHub
commit 32b3afc7bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 96 additions and 2 deletions

View file

@ -427,3 +427,14 @@ def assert_equal_Obs(to, ro):
print(kw, "does not match.")
return False
return True
def test_meas_uuid(tmp_path):
meas = pe.Meas(0.3, 0.2)
for obs in [meas, meas + 1, meas * pe.pseudo_Obs(0.1, 0.001, "obs|r1")]:
with pytest.raises(ValueError):
jsonio.dump_to_json([obs], "test_file", indent=1, description='[This file should not be writable]')
name_meas = pe.Meas(0.3, 0.2, name="my name")
jsonio.dump_to_json([name_meas], "test_file", indent=1, description='[This file should be writable]')