Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_items(setup_cfg_path):
updater = ConfigUpdater()
updater.read(setup_cfg_path)
sect_names, sects = zip(*updater.items())
exp_sect_namess = [
'metadata', 'options', 'options.packages.find',
'options.extras_require', 'test', 'tool:pytest',
'aliases', 'bdist_wheel', 'build_sphinx',
'devpi:upload', 'flake8', 'pyscaffold']
assert list(sect_names) == exp_sect_namess
assert all([isinstance(s, Section) for s in sects])
opt_names, opts = zip(*updater.items('devpi:upload'))
exp_opt_names = ['no-vcs', 'formats']
assert list(opt_names) == exp_opt_names
assert all([isinstance(o, Option) for o in opts])