From 46eda12c1bdc13453446c49c021cbd7ee1e869d8 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 3 Jan 2011 18:30:53 -0600 Subject: pactest: Use booleans where it makes sense No need to use 0/1 when we can use False/True for the force option. Signed-off-by: Dan McGee --- test/pacman/pmdb.py | 2 +- test/pacman/pmpkg.py | 2 +- test/pacman/tests/sync136.py | 2 +- test/pacman/tests/sync137.py | 2 +- test/pacman/tests/sync142.py | 2 +- test/pacman/tests/sync143.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/pacman/pmdb.py b/test/pacman/pmdb.py index 7f798192..c2753370 100755 --- a/test/pacman/pmdb.py +++ b/test/pacman/pmdb.py @@ -162,7 +162,7 @@ class pmdb: pkg.epoch = int(fd.readline().strip("\n")) elif line == "%FORCE%": fd.readline() - pkg.force = 1 + pkg.force = True elif line == "%DEPENDS%": pkg.depends = _getsection(fd) elif line == "%OPTDEPENDS%": diff --git a/test/pacman/pmpkg.py b/test/pacman/pmpkg.py index 9ce09783..e0f3baab 100755 --- a/test/pacman/pmpkg.py +++ b/test/pacman/pmpkg.py @@ -49,7 +49,7 @@ class pmpkg: self.reason = 0 self.md5sum = "" # sync only self.replaces = [] - self.force = 0 + self.force = False self.epoch = 0 self.depends = [] self.optdepends = [] diff --git a/test/pacman/tests/sync136.py b/test/pacman/tests/sync136.py index 58d08eb0..b3a6baf4 100644 --- a/test/pacman/tests/sync136.py +++ b/test/pacman/tests/sync136.py @@ -1,7 +1,7 @@ self.description = "Sysupgrade with a sync package forcing a downgrade" sp = pmpkg("dummy", "1.0-1") -sp.force = 1 +sp.force = True self.addpkg2db("sync", sp) diff --git a/test/pacman/tests/sync137.py b/test/pacman/tests/sync137.py index 94caca70..000855c5 100644 --- a/test/pacman/tests/sync137.py +++ b/test/pacman/tests/sync137.py @@ -5,7 +5,7 @@ lp = pmpkg("dummy", "1.0-1") self.addpkg2db("local", lp) sp = pmpkg("dummy", "1.0-2") -sp.force = 1 +sp.force = True self.addpkg2db("sync", sp) self.args = "-Su --ignore %s" % lp.name diff --git a/test/pacman/tests/sync142.py b/test/pacman/tests/sync142.py index 83766bb8..726ef304 100644 --- a/test/pacman/tests/sync142.py +++ b/test/pacman/tests/sync142.py @@ -5,7 +5,7 @@ sp.epoch = 2 self.addpkg2db("sync", sp) lp = pmpkg("dummy", "2.0-1") -lp.force = 1 +lp.force = True self.addpkg2db("local", lp) self.args = "-Su" diff --git a/test/pacman/tests/sync143.py b/test/pacman/tests/sync143.py index 37353a84..2ee940a9 100644 --- a/test/pacman/tests/sync143.py +++ b/test/pacman/tests/sync143.py @@ -7,7 +7,7 @@ self.addpkg2db("sync", sp) lp = pmpkg("dummy", "2.0-1") lp.files = ["bin/dummyold"] -lp.force = 1 +lp.force = True self.addpkg2db("local", lp) self.args = "-Su" -- cgit v1.2.3-70-g09d2