Add missing test conditions for test_repository_lib.py and minor edits to modules.