From 8787afc3897fb09019dcc16f5fd3a95a2f0184bc Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 14 Aug 2017 14:50:12 +0200 Subject: [PATCH] avoid comparison between None and int Part of fixing selftests.unit.test_xunit under Python 3. Signed-off-by: Paolo Bonzini --- avocado/core/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avocado/core/test.py b/avocado/core/test.py index 2f46b6f5..03806f3e 100644 --- a/avocado/core/test.py +++ b/avocado/core/test.py @@ -79,7 +79,7 @@ class TestName(object): :param no_digits: number of digits of the test uid """ self.uid = uid - if no_digits >= 0: + if no_digits is not None and no_digits >= 0: self.str_uid = str(uid).zfill(no_digits if no_digits else 3) else: self.str_uid = str(uid) -- GitLab