public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Devan Franchini" <twitch153@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/layman:master commit in: layman/tests/
Date: Wed,  3 Dec 2014 19:08:51 +0000 (UTC)	[thread overview]
Message-ID: <1417322673.c84e88abaa0aff6bf7c41c2aea8ca09cf98cb4c2.twitch153@gentoo> (raw)

commit:     c84e88abaa0aff6bf7c41c2aea8ca09cf98cb4c2
Author:     Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 30 04:19:37 2014 +0000
Commit:     Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Sun Nov 30 04:44:33 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=c84e88ab

external.py: Improves success checking in AddDeleteEnableDisableFromDB

---
 layman/tests/external.py | 28 +++++-----------------------
 1 file changed, 5 insertions(+), 23 deletions(-)

diff --git a/layman/tests/external.py b/layman/tests/external.py
index e20baaa..45b4d39 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -89,31 +89,20 @@ class AddDeleteEnableDisableFromDB(unittest.TestCase):
         # Add all the overlays in global_overlays.xml.
         for overlay in a.overlays.keys():
             conf_success = conf.add(a.overlays[overlay])
-            if False in conf_success:
+            if conf_success == False:
                 success.append(False)
             else:
                 success.append(True)
 
         # Disable one overlay.
-        conf_success = conf.disable(a.overlays['wrobel'])
-        if False in conf_success:
-            success.append(False)
-        else:
-            success.append(True)
+        self.assertTrue(conf.disable(a.overlays['wrobel']))
 
         # Enable disabled overlay.
-        conf_success = conf.enable(a.overlays['wrobel'])
-        if False in conf_success:
-            success.append(False)
-        else:
-            success.append(True)
+        self.assertTrue(conf.enable(a.overlays['wrobel']))
+
         # Delete all the overlays in global_overlays.xml.
         for overlay in a.overlays.keys():
-            conf_success = conf.delete(a.overlays[overlay])
-            if False in conf_success:
-                success.append(False)
-            else:
-                success.append(True)
+            self.assertTrue(conf.delete(a.overlays[overlay]))
 
         # Clean up.
         os.unlink(makeconf)
@@ -121,13 +110,6 @@ class AddDeleteEnableDisableFromDB(unittest.TestCase):
 
         shutil.rmtree(tmpdir)
 
-        if False in success:
-            success = False
-        else:
-            success = True
-
-        self.assertTrue(success)
-
 
 # Tests archive overlay types (squashfs, tar)
 # http://bugs.gentoo.org/show_bug.cgi?id=304547


             reply	other threads:[~2014-12-03 19:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-03 19:08 Devan Franchini [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-04-24 20:59 [gentoo-commits] proj/layman:master commit in: layman/tests/ Brian Dolbec
2015-07-14 13:31 Devan Franchini
2015-07-14 13:31 Devan Franchini
2015-07-09 17:19 Devan Franchini
2015-07-09 16:18 Devan Franchini
2015-06-16  1:30 Devan Franchini
2015-03-27 22:03 Devan Franchini
2015-03-27 21:38 Devan Franchini
2015-03-27 20:50 Devan Franchini
2014-12-03 19:08 Devan Franchini
2014-12-03 19:08 Devan Franchini
2014-12-03 19:08 Devan Franchini
2014-12-03 19:08 Devan Franchini
2014-12-03 19:08 Devan Franchini
2014-11-02  3:15 Devan Franchini
2014-06-16  3:37 [gentoo-commits] proj/layman:gsoc2014 " Brian Dolbec
2014-06-16  3:40 ` [gentoo-commits] proj/layman:master " Brian Dolbec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1417322673.c84e88abaa0aff6bf7c41c2aea8ca09cf98cb4c2.twitch153@gentoo \
    --to=twitch153@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox