

def test_duplicate_open_filters(self):
    'Test that only one open() filter can be used.\n        '

    class OpenFilter(Filter):

        def open(self, *a, **kw):
            pass

        def __init__(self, id):
            Filter.__init__(self)
            self.id = id

        def id(self):
            return self.id
    self.create_files(set('xyz'))
    bundle = self.mkbundle('xyz', filters=(OpenFilter('a'), OpenFilter('b')))
    assert_raises(BuildError, bundle.build)

dataset/ETHPy150Open miracle2k/webassets/tests/test_bundle_build.py TestFilterApplication.test_duplicate_open_filters/original