remove two more assert statements with side-effects

- these were overlooked in e7d531db0
- scripts now run with PYTHONOPTIMIZE=1, though this should never be set
  in a production environment
This commit is contained in:
The MMGen Project 2022-01-19 11:43:51 +00:00
commit 3fa644b35b
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
2 changed files with 4 additions and 2 deletions

View file

@ -230,7 +230,8 @@ class AddrFile(MMGenObject):
assert len(lines) >= 3, f'Too few lines in address file ({len(lines)})'
ls = lines[0].split()
assert 1 < len(ls) < 5, f'Invalid first line for {p.gen_desc} file: {lines[0]!r}'
assert ls.pop() == '{', f'{ls!r}: invalid first line'
assert ls[-1] == '{', f'{ls!r}: invalid first line'
ls.pop()
assert lines[-1] == '}', f'{lines[-1]!r}: invalid last line'
sid = ls.pop(0)
assert is_seed_id(sid), f'{sid!r}: invalid Seed ID'

View file

@ -32,7 +32,8 @@ for i in (1,2,3):
msg('\npw')
for k in ('A','B'):
assert pwfile_reuse_warning(k).warning_shown == (i != 1), 'warning_shown incorrect'
ret = pwfile_reuse_warning(k).warning_shown
assert ret == (i != 1), 'warning_shown incorrect'
msg('wg1')
wg('foo')