class RepositoryProvider(SubunitProvider):
    def __init__(self, repository_path):
        self.repository_path = repository_path
        self.repository = RepositoryFactory().open(repository_path)

    @property
    def name(self):
        return "repo_%s" % os.path.basename(self.repository_path)

    @property
    def description(self):
        return "Repository: %s" % os.path.basename(self.repository_path)

    @property
    def count(self):
        return self.repository.count()

    def get_stream(self, index):
        return self.repository.get_latest_run().get_subunit_stream()
class RepositoryProvider(SubunitProvider):
    def __init__(self, repository_path):
        self.repository_path = repository_path
        self.repository = RepositoryFactory().open(repository_path)

    @property
    def name(self):
        return "repo_%s" % os.path.basename(self.repository_path)

    @property
    def description(self):
        return "Repository: %s" % os.path.basename(self.repository_path)

    @property
    def count(self):
        return self.repository.count()

    def get_stream(self, index):
        return self.repository.get_latest_run().get_subunit_stream()
 def __init__(self, repository_path):
     self.repository_path = repository_path
     self.repository = RepositoryFactory().open(repository_path)
 def __init__(self, repository_path):
     self.repository_path = repository_path
     self.repository = RepositoryFactory().open(repository_path)