

def test_can_process(self):

    class _CovHandler(ArtifactHandler):
        FILENAMES = ('coverage.xml',)

    class _OtherHandler(ArtifactHandler):
        FILENAMES = ('/other.xml', 'foo/*/weird.json')
    manager = Manager([_CovHandler, _OtherHandler])
    assert manager.can_process('foo/coverage.xml')
    assert manager.can_process('other.xml')
    assert manager.can_process('artifactstore/other.xml')
    assert self.can_process('foo/bar/weird.json')
    assert manager.can_process('artifactstore/foo/bar/weird.json')
    assert (not manager.can_process('foo/other.xml'))
    assert (not manager.can_process('bar/foo/baz/weird.json'))
    assert (not manager.can_process('service.log'))

dataset/ETHPy150Open dropbox/changes/tests/changes/artifacts/test_manager.py ManagerTest.test_can_process/VarMisuse@81/137 `manager`->`self`