Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 248C0C433F5 for ; Sat, 29 Jan 2022 21:15:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 40AE4836D3; Sat, 29 Jan 2022 22:15:00 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="OD2RNMYz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5CA9A836A3; Sat, 29 Jan 2022 22:14:49 +0100 (CET) Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DEC9C836AB for ; Sat, 29 Jan 2022 22:14:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2d.google.com with SMTP id h7so12060718iof.3 for ; Sat, 29 Jan 2022 13:14:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hklN++DjuQ7YB/bE4aZaWlq9/dxmzWj6E+gyVoh3yFw=; b=OD2RNMYzF6tTrj+9Okf4k+uHJRE6XLym4siPLAOzjyEEWS26vXN6wW61ueh9jzd+rY Zryoe88Ivrl3/BIaCaCSpkhGU51WfhU4KF/HMYL2TKi1imsrVwFKygah5ZnnoxAZCBQX XWbQ6Na29fD9ptJFff6Qx3WxQASYgxTQcPCh8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hklN++DjuQ7YB/bE4aZaWlq9/dxmzWj6E+gyVoh3yFw=; b=OmA/OJYj7sKeLn95Vojg4+I/+g4TxLwuKxnA/zy9WOZNDNYrm4eBUkvkpn7CMZg+n5 xXM+lNGo7DO1aLbR2RDmfLMQvtLPw/Cgqqc9dXbvwvhOx8BnszyWFbC3XcsiBzGhqn+/ jSdG01h7CAFpiGkjWQvbpQWkJ9ZeMH1nghs7WPuCCEpG+fQs5Bx5UM9EX7JtWJjNbi4h cGl9mEVD1Q8EGSLlyj5aX+cNH9nQsSnxZ0iMcGtHHajnYbz3QLShd+9UEGfBvk796ceg qK4LGNepY5KJcOXAexkLFdtAe7KH+nPSobh6NdCyhzJSqna77uPJRse7QUMrapO8rG5r 91GA== X-Gm-Message-State: AOAM532bzBLQK2zfaVMRaF5oW8Y/rOKaRbCHJlssa7V86xtLqAokP+5I mhdxzqiOtEULhr8pO1kMo6TWwz616LPS5g== X-Google-Smtp-Source: ABdhPJxF2DaCVe0z/Re2lML+OXXvC7tOVoqSkz02d5FM9ZccdeJGhqpd4Ts7dNgBAs6kR1plZNFzJg== X-Received: by 2002:a6b:8e89:: with SMTP id q131mr8364395iod.77.1643490877063; Sat, 29 Jan 2022 13:14:37 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id c3sm17218110iow.28.2022.01.29.13.14.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Jan 2022 13:14:36 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Tom Rini , Simon Glass Subject: [PATCH 06/17] patman: Convert camel case in func_test.py Date: Sat, 29 Jan 2022 14:14:09 -0700 Message-Id: <20220129211420.528117-7-sjg@chromium.org> X-Mailer: git-send-email 2.35.0.rc2.247.g8bbb082509-goog In-Reply-To: <20220129211420.528117-1-sjg@chromium.org> References: <20220129211420.528117-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Convert this file to snake case and update all files which use it. Signed-off-by: Simon Glass --- tools/patman/func_test.py | 50 +++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py index defa1cca716..89950c254b0 100644 --- a/tools/patman/func_test.py +++ b/tools/patman/func_test.py @@ -114,7 +114,7 @@ class TestFunctional(unittest.TestCase): return cover_fname, fname_list - def testBasic(self): + def test_basic(self): """Tests the basic flow of patman This creates a series from some hard-coded patches build from a simple @@ -455,7 +455,7 @@ complicated as possible''') repo.branches.local.create('base', base_target) return repo - def testBranch(self): + def test_branch(self): """Test creating patches from a branch""" repo = self.make_git_tree() target = repo.lookup_reference('refs/heads/first') @@ -494,7 +494,7 @@ complicated as possible''') finally: os.chdir(orig_dir) - def testTags(self): + def test_tags(self): """Test collection of tags in a patchstream""" text = '''This is a patch @@ -508,7 +508,7 @@ Tested-by: %s 'Reviewed-by': {self.joe, self.mary}, 'Tested-by': {self.leb}}) - def testInvalidTag(self): + def test_invalid_tag(self): """Test invalid tag in a patchstream""" text = '''This is a patch @@ -519,7 +519,7 @@ Serie-version: 2 self.assertEqual("Line 3: Invalid tag = 'Serie-version: 2'", str(exc.exception)) - def testMissingEnd(self): + def test_missing_end(self): """Test a missing END tag""" text = '''This is a patch @@ -532,7 +532,7 @@ Signed-off-by: Fred self.assertEqual(["Missing 'END' in section 'cover'"], pstrm.commit.warn) - def testMissingBlankLine(self): + def test_missing_blank_line(self): """Test a missing blank line after a tag""" text = '''This is a patch @@ -545,7 +545,7 @@ Signed-off-by: Fred self.assertEqual(["Missing 'blank line' in section 'Series-changes'"], pstrm.commit.warn) - def testInvalidCommitTag(self): + def test_invalid_commit_tag(self): """Test an invalid Commit-xxx tag""" text = '''This is a patch @@ -554,7 +554,7 @@ Commit-fred: testing pstrm = PatchStream.process_text(text) self.assertEqual(["Line 3: Ignoring Commit-fred"], pstrm.commit.warn) - def testSelfTest(self): + def test_self_test(self): """Test a tested by tag by this user""" test_line = 'Tested-by: %s@napier.com' % os.getenv('USER') text = '''This is a patch @@ -564,7 +564,7 @@ Commit-fred: testing pstrm = PatchStream.process_text(text) self.assertEqual(["Ignoring '%s'" % test_line], pstrm.commit.warn) - def testSpaceBeforeTab(self): + def test_space_before_tab(self): """Test a space before a tab""" text = '''This is a patch @@ -573,7 +573,7 @@ Commit-fred: testing pstrm = PatchStream.process_text(text) self.assertEqual(["Line 3/0 has space before tab"], pstrm.commit.warn) - def testLinesAfterTest(self): + def test_lines_after_test(self): """Test detecting lines after TEST= line""" text = '''This is a patch @@ -584,7 +584,7 @@ here pstrm = PatchStream.process_text(text) self.assertEqual(["Found 2 lines after TEST="], pstrm.commit.warn) - def testBlankLineAtEnd(self): + def test_blank_line_at_end(self): """Test detecting a blank line at the end of a file""" text = '''This is a patch @@ -611,7 +611,7 @@ diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c ["Found possible blank line(s) at end of file 'lib/fdtdec.c'"], pstrm.commit.warn) - def testNoUpstream(self): + def test_no_upstream(self): """Test CountCommitsToBranch when there is no upstream""" repo = self.make_git_tree() target = repo.lookup_reference('refs/heads/base') @@ -648,7 +648,7 @@ diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c {'id': '1', 'name': 'Some patch'}]} raise ValueError('Fake Patchwork does not understand: %s' % subpath) - def testStatusMismatch(self): + def test_status_mismatch(self): """Test Patchwork patches not matching the series""" series = Series() @@ -657,7 +657,7 @@ diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c self.assertIn('Warning: Patchwork reports 1 patches, series has 0', err.getvalue()) - def testStatusReadPatch(self): + def test_status_read_patch(self): """Test handling a single patch in Patchwork""" series = Series() series.commits = [Commit('abcd')] @@ -669,7 +669,7 @@ diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c self.assertEqual('1', patch.id) self.assertEqual('Some patch', patch.raw_subject) - def testParseSubject(self): + def test_parse_subject(self): """Test parsing of the patch subject""" patch = status.Patch('1') @@ -731,7 +731,7 @@ diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c self.assertEqual('RESEND', patch.prefix) self.assertEqual(None, patch.version) - def testCompareSeries(self): + def test_compare_series(self): """Test operation of compare_with_series()""" commit1 = Commit('abcd') commit1.subject = 'Subject 1' @@ -833,7 +833,7 @@ diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c return patch.comments raise ValueError('Fake Patchwork does not understand: %s' % subpath) - def testFindNewResponses(self): + def test_find_new_responses(self): """Test operation of find_new_responses()""" commit1 = Commit('abcd') commit1.subject = 'Subject 1' @@ -971,7 +971,7 @@ diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c return patch.comments raise ValueError('Fake Patchwork does not understand: %s' % subpath) - def testCreateBranch(self): + def test_create_branch(self): """Test operation of create_branch()""" repo = self.make_git_tree() branch = 'first' @@ -1058,7 +1058,7 @@ diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c self.assertEqual('Reviewed-by: %s' % self.mary, next(lines)) self.assertEqual('Tested-by: %s' % self.leb, next(lines)) - def testParseSnippets(self): + def test_parse_snippets(self): """Test parsing of review snippets""" text = '''Hi Fred, @@ -1088,7 +1088,7 @@ Even more And another comment -> @@ -153,8 +143,13 @@ def CheckPatch(fname, show_types=False): +> @@ -153,8 +143,13 @@ def check_patch(fname, show_types=False): > further down on the file > and more code > +Addition here @@ -1131,7 +1131,7 @@ line8 '> Code line 7', '> Code line 8', '> Code line 9', 'And another comment'], ['> File: file.c', - '> Line: 153 / 143: def CheckPatch(fname, show_types=False):', + '> Line: 153 / 143: def check_patch(fname, show_types=False):', '> and more code', '> +Addition here', '> +Another addition here', '> codey', '> more codey', 'and another thing in same file'], ['> File: file.c', '> Line: 253 / 243', @@ -1141,7 +1141,7 @@ line8 'line2', 'line3', 'line4', 'line5', 'line6', 'line7', 'line8']], pstrm.snippets) - def testReviewSnippets(self): + def test_review_snippets(self): """Test showing of review snippets""" def _to_submitter(who): m_who = re.match('(.*) <(.*)>', who) @@ -1196,7 +1196,7 @@ On some date Fred wrote: > + def __str__(self): > + return self.subject > + -> def AddChange(self, version, info): +> def add_change(self, version, info): > """Add a new change line to the change list for a version. > A comment @@ -1280,7 +1280,7 @@ Reviewed-by: %s self.assertEqual(terminal.PrintLine( ' > +', col.MAGENTA), next(lines)) self.assertEqual( - terminal.PrintLine(' > def AddChange(self, version, info):', + terminal.PrintLine(' > def add_change(self, version, info):', col.MAGENTA), next(lines)) self.assertEqual(terminal.PrintLine( @@ -1296,7 +1296,7 @@ Reviewed-by: %s '4 new responses available in patchwork (use -d to write them to a new branch)', None), next(lines)) - def testInsertTags(self): + def test_insert_tags(self): """Test inserting of review tags""" msg = '''first line second line.''' -- 2.35.0.rc2.247.g8bbb082509-goog