• maruel@chromium.org's avatar
    Make FakeRepos more reusable. · 17cdf761
    maruel@chromium.org authored
    Make it work with 'coverage'.
    Make FakeRepos initialization lazy. Only generate the repository when needed. It's in part intended for gclient_scm_tests.py but I left it out of this review.
    
    To use:
      easy_install coverage
      ./tests/gclient_smoke.py -c
      coverage report
    
    Current coverage with gclient_smoke:
    
    Name                        Stmts   Exec  Cover
    -----------------------------------------------
    gclient                       557    416    74%
    gclient_scm                   496    270    54%
    gclient_utils                 195    117    60%
    scm                           439    180    41%
    (ignoring irrelevant files)
    
    It's quite good in fact, 74% of gclient.py being executed with the smoke test.
    
    Review URL: http://codereview.chromium.org/2352002
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48501 0039d316-1c4b-4281-b951-d872f2087c98
    17cdf761
fake_repos.py 14.3 KB