def test_should_register_source_paths(self): system_path = ['some/python/path'] _register_test_and_source_path_and_return_test_dir(self.project, system_path, "unittest") self.assertTrue('/path/to/project/unittest' in system_path) self.assertTrue('/path/to/project/src' in system_path)
def test_should_register_source_paths(self): system_path = ["some/python/path"] _register_test_and_source_path_and_return_test_dir(self.project, system_path) self.assertTrue("/path/to/project/unittest" in system_path) self.assertTrue("/path/to/project/src" in system_path)
def test_should_register_source_paths(self): system_path = [np("some/python/path")] _register_test_and_source_path_and_return_test_dir(self.project, system_path, "unittest") self.assertTrue(np(jp(self.project.basedir, "unittest")) in system_path) self.assertTrue(np(jp(self.project.basedir, "src")) in system_path)
def test_should_register_source_paths(self): system_path = [nc('some/python/path')] _register_test_and_source_path_and_return_test_dir(self.project, system_path, "unittest") self.assertTrue(nc('/path/to/project/unittest') in system_path) self.assertTrue(nc('/path/to/project/src') in system_path)
def test_should_put_project_sources_before_other_sources(self): system_path = ['irrelevant/sources'] _register_test_and_source_path_and_return_test_dir(self.project, system_path, "unittest") test_sources_index_in_path = system_path.index('/path/to/project/unittest') main_sources_index_in_path = system_path.index('/path/to/project/src') irrelevant_sources_index_in_path = system_path.index('irrelevant/sources') self.assertTrue(test_sources_index_in_path < irrelevant_sources_index_in_path and main_sources_index_in_path < irrelevant_sources_index_in_path)
def test_should_put_project_sources_before_other_sources(self): system_path = [np("irrelevant/sources")] _register_test_and_source_path_and_return_test_dir(self.project, system_path, "unittest") test_sources_index_in_path = system_path.index(np(jp(self.project.basedir, "unittest"))) main_sources_index_in_path = system_path.index(np(jp(self.project.basedir, "src"))) irrelevant_sources_index_in_path = system_path.index(np("irrelevant/sources")) self.assertTrue(test_sources_index_in_path < irrelevant_sources_index_in_path and main_sources_index_in_path < irrelevant_sources_index_in_path)
def test_should_put_project_sources_before_other_sources(self): system_path = [nc('irrelevant/sources')] _register_test_and_source_path_and_return_test_dir(self.project, system_path, "unittest") test_sources_index_in_path = system_path.index(nc('/path/to/project/unittest')) main_sources_index_in_path = system_path.index(nc('/path/to/project/src')) irrelevant_sources_index_in_path = system_path.index(nc('irrelevant/sources')) self.assertTrue(test_sources_index_in_path < irrelevant_sources_index_in_path and main_sources_index_in_path < irrelevant_sources_index_in_path)