#!/usr/bin/env python

import os
import doctest
import unittest

def get_storage_root():
    try:
        root = os.path.expanduser('~')
    except:
        pass
    root = root or os.getenv('HOME') or os.getcwd()
    return os.path.join(root, '.gravy')

store = get_storage_root()

if not os.path.exists(store) or not os.listdir(store):
    print('The first test run will take a while as repos are not yet stored')
suite = unittest.TestSuite()
suite.addTest(doctest.DocFileSuite('README'))
unittest.TextTestRunner(verbosity=2).run(suite)

