File: doctest.py

package info (click to toggle)
smart-open 7.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 980 kB
  • sloc: python: 8,054; sh: 90; makefile: 14
file content (9 lines) | stat: -rw-r--r-- 338 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
"""Runs the doctests, if the AWS credentials are available.

Without the credentials, skips the tests entirely, because otherwise they will fail.
"""
import os
import subprocess

if os.environ.get('AWS_ACCESS_KEY_ID') and os.environ.get('AWS_SECRET_ACCESS_KEY'):
    subprocess.check_call(['python', '-m', 'doctest', 'README.rst', '-v'])