def METHOD_NAME(IOtest_mtz):
    """Test that DataSet.write_mtz() without cell raises AttributeError"""
    dataset = rs.read_mtz(IOtest_mtz)
    dataset.cell = None
    with tempfile.NamedTemporaryFile(suffix=".mtz") as temp:
        with pytest.raises(AttributeError):
            dataset.write_mtz(temp.name)