26 lines
917 B
Diff
26 lines
917 B
Diff
From 73d62d4421a06a3282c1a71625b070e3ca58b624 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
|
|
Date: Fri, 7 Apr 2017 09:55:15 +0300
|
|
Subject: [PATCH] Pkg.b2s: Add some more test cases
|
|
|
|
---
|
|
test/test.Pkg.py | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
Index: rpmlint-rpmlint-1.9/test/test.Pkg.py
|
|
===================================================================
|
|
--- rpmlint-rpmlint-1.9.orig/test/test.Pkg.py
|
|
+++ rpmlint-rpmlint-1.9/test/test.Pkg.py
|
|
@@ -31,8 +31,10 @@ class TestPkg(unittest.TestCase):
|
|
self.assertFalse(Pkg.rangeCompare(req, prov))
|
|
|
|
def test_b2s(self):
|
|
- for thing in ("foo", ["foo"]):
|
|
+ for thing in ("foo", ["foo"], None, []):
|
|
self.assertEqual(thing, Pkg.b2s(thing))
|
|
+ self.assertEqual("foo", Pkg.b2s(b"foo"))
|
|
+ self.assertEqual(["foo"], Pkg.b2s([b"foo"]))
|
|
|
|
|
|
if __name__ == '__main__':
|