From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3F2A915800F for ; Sat, 18 Feb 2023 10:13:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 37900E0876; Sat, 18 Feb 2023 10:13:55 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 166DBE0876 for ; Sat, 18 Feb 2023 10:13:55 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 39D36340F2D for ; Sat, 18 Feb 2023 10:13:54 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 93FF88B5 for ; Sat, 18 Feb 2023 10:13:52 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1676715215.ebf78db6d9bb72f5ca6538ad5cc94ec297f9aa2f.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/tests/news/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/tests/news/test_NewsItem.py X-VCS-Directories: lib/portage/tests/news/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: ebf78db6d9bb72f5ca6538ad5cc94ec297f9aa2f X-VCS-Branch: master Date: Sat, 18 Feb 2023 10:13:52 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5694ed1a-9783-43be-8369-08b2175cbf04 X-Archives-Hash: d53dbd14a4f59088e4939f7a0d9ab4d1 commit: ebf78db6d9bb72f5ca6538ad5cc94ec297f9aa2f Author: Sam James gentoo org> AuthorDate: Thu Feb 16 07:42:31 2023 +0000 Commit: Sam James gentoo org> CommitDate: Sat Feb 18 10:13:35 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ebf78db6 tests: news: add trivial no-filter test Add a basic test case for when no filter fields are used (no Display-If-*). Bug: https://bugs.gentoo.org/889330 Signed-off-by: Sam James gentoo.org> lib/portage/tests/news/test_NewsItem.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/portage/tests/news/test_NewsItem.py b/lib/portage/tests/news/test_NewsItem.py index e6f9a08b3..ba9fa0035 100644 --- a/lib/portage/tests/news/test_NewsItem.py +++ b/lib/portage/tests/news/test_NewsItem.py @@ -137,6 +137,13 @@ class NewsItemTestCase(TestCase): return FakeNewsItem(**news_args) + def testBasicNewsItem(self): + # Simple test with no filter fields (Display-If-*) + try: + item = self._processItem(str(self._createNewsItem())) + finally: + os.unlink(item.path) + def testDisplayIfProfile(self): tmpItem = self._createNewsItem({"display_if_profile": [self.profile]})