Skip to content

Commit

Permalink
Add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Goetz committed Mar 17, 2023
1 parent 72754bb commit b10b53c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions gwsumm/tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,18 @@ def test_load_states(self):
assert states['locked'].definition == 'X1:TEST-STATE:1'
assert state.ALLSTATE in states

def test_load_state_metastate(self):
cp = self.new()
cp.set_date_options(0, 100)
cp.add_section('metastate-test')
cp.set('metastate-test', 'uses', 'locked')
cp.set('metastate-test', 'name', 'meta')
cp.load_states()
states = state.get_states()
assert len(states) == 3
assert 'meta' in states
assert states['meta'].uses == ['locked']

def test_load_plugins(self, cnfg):
# check that empty section doesn't cause havoc
cp = self.PARSER()
Expand Down

0 comments on commit b10b53c

Please sign in to comment.