コード例 #1
0
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
コード例 #2
0
 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