def test_setting_entry(caplog, RAW_STRUCTURES): """Make sure entry can only be set once""" structure = Structure(RAW_STRUCTURES[0]) structure.entry = RAW_STRUCTURES[1] assert "entry can only be set once and is already set." in caplog.text
def test_setting_entry(self, capfd, RAW_STRUCTURES): """Make sure entry can only be set once""" structure = Structure(RAW_STRUCTURES[0]) structure.entry = RAW_STRUCTURES[1] captured = capfd.readouterr() assert "entry can only be set once and is already set." in captured.out