SCM clients refactoring first step, tests for GitClient

Review Request #2452 — Created July 6, 2011 and submitted

Information

RBTools

Reviewers

This patch starts series of patches intended to refactor existing SCM clients and cover them with tests. The current patch does small cleanups in GitClient and adapts postreview GitClientTests to it.
rbtools/clients/test.py
Description From Last Updated

Shouldn't this be ['svn', 'find-rev'] ?

chipx86chipx86

['apply', '--check'] ?

chipx86chipx86

Update to use rbtools.clients.

chipx86chipx86

Two blank lines.

chipx86chipx86

No blank line.

chipx86chipx86

Probably should do the in_path test before creating a GitClient().

chipx86chipx86

Should use # and not """ for commenting out. """ is for long strings or documentation. Same with other instances …

chipx86chipx86
chipx86
  1. Can you sync this with the latest SCMClient changes?
    
    Also, testutils should probably be in rbtools.utils.
  2. 
      
chipx86
  1. 
      
  2. rbtools/clients/git.py (Diff revision 1)
     
     
     
     
    You can simplify this to:
    
    return self.util.execute([GIT_CMD] + params, **kwargs)
  3. rbtools/clients/git.py (Diff revision 1)
     
     
    Show all issues
    Shouldn't this be ['svn', 'find-rev'] ?
  4. rbtools/clients/git.py (Diff revision 1)
     
     
    Show all issues
    ['apply', '--check'] ?
  5. rbtools/clients/test.py (Diff revision 1)
     
     
    Show all issues
    Update to use rbtools.clients.
  6. rbtools/clients/test.py (Diff revision 1)
     
     
     
     
    Show all issues
    Two blank lines.
  7. rbtools/clients/test.py (Diff revision 1)
     
     
     
     
    Show all issues
    No blank line.
  8. rbtools/clients/test.py (Diff revision 1)
     
     
     
     
    Show all issues
    Probably should do the in_path test before creating a GitClient().
  9. rbtools/clients/test.py (Diff revision 1)
     
     
     
     
     
     
     
     
    Show all issues
    Should use # and not """ for commenting out. """ is for long strings or documentation.
    
    Same with other instances in this file.
    
    If a test can't be implemented today due to work still needing to be done, just comment out the whole test function with a little note. Don't bother to implement and raise SkipTest. Ideally, a SkipTest should be fixable by fulfilling a dependency.
  10. 
      
MB
MB
chipx86
  1. Ship It!
  2. 
      
MB
Review request changed
Status:
Completed
Change Summary:
Submitted to master (18c3d5d) and api.