def AddNearestThirdPartyFoldersToSysPath_IgnoreVirtualEnvLibrary_test(*args): AddNearestThirdPartyFoldersToSysPath(__file__) assert_that(sys.path[:len(THIRD_PARTY_FOLDERS)], contains_inanyorder(*THIRD_PARTY_FOLDERS)) assert_that( sys.path[len(THIRD_PARTY_FOLDERS):], contains(PathToTestFile('python-future', 'some', 'path'), PathToTestFile('python-future', 'virtualenv_library'), PathToTestFile('python-future', 'standard_library'), os.path.join(DIR_OF_THIRD_PARTY, 'python-future', 'src'), PathToTestFile('python-future', 'another', 'path')))
def AddNearestThirdPartyFoldersToSysPath_FutureLastIfNoPackages_test(): AddNearestThirdPartyFoldersToSysPath(__file__) assert_that(sys.path[:len(THIRD_PARTY_FOLDERS)], contains_inanyorder(*THIRD_PARTY_FOLDERS)) assert_that( sys.path[len(THIRD_PARTY_FOLDERS):], contains( '/some/path', '/another/path', os.path.join(DIR_OF_THIRD_PARTY, 'python-future', 'src'), ))