def testWhenAllDatasetsFetchedNotificationIsDisplayed(self): with self.mockOutput('', 'C57_AB dataset already present\nFVB dataset already present\ndemo dataset already present\nAll datasets already present.\n'): getTutorialData()
def testWhenAllDatasetsFetchedMissingDatasetIsSavedInTheCurrentDirectory(self): getTutorialData() self.checkExist('demo.zip', 'COPYING', 'LICENSE')
def setUp(self): super(GivenAllDatasetsPresent, self).setUp() getTutorialData()
def testWhenTheDatasetFetchedWithQuietFlagNoNotificationDisplayed(self): with self.mockOutput('', ''): getTutorialData(fetch='C57_AB', quiet=True)
def setUp(self): super(GivenC57_ABDatasetPresent, self).setUp() getTutorialData(fetch='C57_AB')
def testWhenUnknownDatasetRequestedNotificationIsDisplayed(self): with self.mockOutput('', 'Warning: unknown download requested (unknownDataset)\nAll datasets already present.\n'): getTutorialData(fetch='unknownDataset')
def testWhenDatasetFetchedNoNotificationIsDisplayed(self): for name in self.DATASETS: with self.mockOutput('', ''): getTutorialData(fetch=name)
def testWhenDatasetFetchedItIsSavedInTheCurrentDirectory(self): for name, files in self.DATASETS.items(): getTutorialData(fetch=name) self.checkExist(*files)