run_test.py 808 B

1234567891011121314151617181920212223242526272829303132
  1. # tests for certifi-2023.5.7-py39h06a4308_0 (this is a generated file);
  2. print('===== testing package: certifi-2023.5.7-py39h06a4308_0 =====');
  3. print('running run_test.py');
  4. # --- run_test.py (begin) ---
  5. import certifi
  6. import pip
  7. def certifi_tests():
  8. """
  9. Tests to validate certifi pkg
  10. """
  11. if hasattr(pip, 'main'):
  12. pip.main(['install', "pem"])
  13. else:
  14. pip._internal.main(['install', "pem"])
  15. certificate = certifi.where()
  16. assert certificate[-10::] == "cacert.pem", "Unable to find the certificate file"
  17. import pem
  18. certs = pem.parse_file(certificate)
  19. cert_key = str(certs[0])
  20. assert cert_key != None, "Failed to find the valid certificate "
  21. certifi_tests()# --- run_test.py (end) ---
  22. print('===== certifi-2023.5.7-py39h06a4308_0 OK =====');
  23. print("import: 'certifi'")
  24. import certifi