def render_all(maximal_label=MAXIMAL_LABEL, topdown=TOPDOWN, directory=DIRECTORY, format=None): # pragma: no cover from features.systems import FeatureSystem from features.meta import Config for conf in Config: fs = FeatureSystem(conf) dot = fs.graphviz(maximal_label=maximal_label, topdown=topdown, directory=directory, format=format) dot.render()
def render_all(maximal_label=MAXIMAL_LABEL, topdown=TOPDOWN, directory=DIRECTORY, format=None): from features.systems import FeatureSystem from features.meta import Config for conf in Config: fs = FeatureSystem(conf) dot = fs.graphviz(None, maximal_label, topdown, None, directory) if format is not None: dot.format = format dot.render()
def test_init_substrings(): context = ''' |egg|eggs| spam| X | | ham | | X | ''' config = Config.create(context=context) with pytest.raises(ValueError, match=r'substring'): FeatureSystem(config)
def test_init_inatomic(): context = ''' |catholic|protestant| spam| X | | eggs| X | | ham | | X | ''' config = Config.create(context=context) with pytest.raises(ValueError, match=r'individual'): FeatureSystem(config)
def fs(name='plural'): return FeatureSystem(name)
def fs_noname(fs): config = Config.create(context=fs._config.context) return FeatureSystem(config)