def test_replace_cannot_add_new_fields(self): r = Record() with pytest.raises(TypeError): r._replace(x=2)
def test_raises_when_assigning_new_fields(self): r = Record() with pytest.raises(TypeError): r.x = 2