def test_non_supported_organism(self): fake_reference_folder = FakeReferenceFolder() test_tools.mock_file_existence( existing_files=fake_reference_folder.resources ) with self.assertRaises(NeofoxConfigurationException): ReferenceFolder(organism="rat")
def test_one_resource_do_not_exist(self): fake_reference_folder = FakeReferenceFolder() test_tools.mock_file_existence( existing_files=fake_reference_folder.resources[ 1 : len(fake_reference_folder.resources) ], non_existing_files=[fake_reference_folder.resources[0]], ) with self.assertRaises(NeofoxConfigurationException): ReferenceFolder()
def setUp(self): self.variables = { neofox.NEOFOX_BLASTP_ENV: "/path/to/blastp", neofox.NEOFOX_NETMHC2PAN_ENV: "/path/to/netmhc2pan", neofox.NEOFOX_NETMHCPAN_ENV: "/path/to/netmhcpan", neofox.NEOFOX_RSCRIPT_ENV: "/path/to/rscript", neofox.NEOFOX_MIXMHCPRED_ENV: "/path/to/mixmhcpred", neofox.NEOFOX_MIXMHC2PRED_ENV: "/path/to/mixmhc2pred", neofox.NEOFOX_PRIME_ENV: "/path/to/prime", } self.non_existing = "/path/to/nothing" self.non_executable = "/path/to/something/not/executable" test_tools.mock_file_existence( existing_files=list(self.variables.values()) + [self.non_executable], non_existing_files=[self.non_existing], ) test_tools.mock_file_is_executable( executable_files=list(self.variables.values()), non_executable_files=[self.non_executable], )
def test_organism_human(self): fake_reference_folder = FakeReferenceFolder() test_tools.mock_file_existence( existing_files=fake_reference_folder.resources ) ReferenceFolder(organism=ORGANISM_HOMO_SAPIENS)
def test_organism_mouse(self): fake_reference_folder = FakeReferenceFolder(organism=ORGANISM_MUS_MUSCULUS) test_tools.mock_file_existence( existing_files=fake_reference_folder.resources ) ReferenceFolder(organism=ORGANISM_MUS_MUSCULUS)
def test_all_resources_exist(self): fake_reference_folder = FakeReferenceFolder() test_tools.mock_file_existence( existing_files=fake_reference_folder.resources ) ReferenceFolder()