Login | Register
My pages Projects Community openCollabNet

Discussions > Commits > svn commit: r132 - trunk/repoguard: src/repoguard/checks test/repoguard_test/checks

repoguard
Discussion topic

Back to topic list

svn commit: r132 - trunk/repoguard: src/repoguard/checks test/repoguard_test/checks

Author schlauch
Full name Tobias Schlauch
Date 2012-09-17 07:38:34 PDT
Message Author: schlauch
Date: 2012-09-17 07:38:33-0700
New Revision: 132

Modified:
   trunk/repoguard/src/​repoguard/checks/che​ckout.py
   trunk/repoguard/test​/repoguard_test/chec​ks/test_pylint.py

Log:
Corrected some false-positive test.
One hid an error.

Modified: trunk/repoguard/src/​repoguard/checks/che​ckout.py
Url: http://repoguard.tig​ris.org/source/brows​e/repoguard/trunk/re​poguard/src/repoguar​d/checks/checkout.py​?view=diff&pathr​ev=132&r1=131​&r2=132
====================​====================​====================​==================
--- trunk/repoguard/src/​repoguard/checks/che​ckout.py (original)
+++ trunk/repoguard/src/​repoguard/checks/che​ckout.py 2012-09-17 07:38:33-0700
@@ -28,21 +28,17 @@
         entries = Array(Entry)
 
 class Checkout(Check):
-
+
     __config__ = Config
 
     def _run(self, config):
-
         for entry in config.entries:
             if self.transaction.fil​e_exists(entry.sourc​e):
                 filepath = self.transaction.get​_file(entry.source)
             else:
- return self.error("File %r to checkout does not exist in the "
- + "repository." % entry.source)
-
+ return self.error("File %r to checkout does not exist in the repository." % entry.source)
             try:
                 shutil.move(filepath, entry.destination)
- except IOError, e:
- return self.error("Failed to checkout file %r to %r: %s"
- % (entry.source, entry.destination, e))
+ except IOError, error:
+ return self.error("Failed to checkout file %r to %r: %s" % (entry.source, entry.destination, error))
         return self.success()

Modified: trunk/repoguard/test​/repoguard_test/chec​ks/test_pylint.py
Url: http://repoguard.tig​ris.org/source/brows​e/repoguard/trunk/re​poguard/test/repogua​rd_test/checks/test_​pylint.py?view=diff​&pathrev=132&​r1=131&r2=132
====================​====================​====================​==================
--- trunk/repoguard/test​/repoguard_test/chec​ks/test_pylint.py (original)
+++ trunk/repoguard/test​/repoguard_test/chec​ks/test_pylint.py 2012-09-17 07:38:33-0700
@@ -53,6 +53,6 @@
 
     def test_failure(self):
         # Let pylint return an error
- pylint_.lint.Run = mock.Mock(side_effect=lambda _, __, ___: mock.Mock())
+ pylint_.lint.Run = mock.Mock(side_effec​t=Exception)
         assert not self._pylint.run(sel​f._without_pylintrc)​.success
         assert not self._pylint.run(sel​f._with_pylintrc).su​ccess

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r132 - trunk/repoguard: src/repoguard/checks test/repoguard_test/checks schlauch Tobias Schlauch 2012-09-17 07:38:34 PDT
Messages per page: