From 7c4f9521c78ec2c726ce48747b6a36046dbf8c46 Mon Sep 17 00:00:00 2001 From: Karthik Bekal Pattathana <133984042+karthikbekalp@users.noreply.github.com> Date: Thu, 26 Mar 2026 11:13:19 -0700 Subject: [PATCH] test: Fix copyright test failing on new comment by setuptools-scm Signed-off-by: Karthik Bekal Pattathana <133984042+karthikbekalp@users.noreply.github.com> --- .../test_copyright_headers.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/test/unit/deadline_adaptor_for_cinema4d/test_copyright_headers.py b/test/unit/deadline_adaptor_for_cinema4d/test_copyright_headers.py index c64d7a09..00e04065 100644 --- a/test/unit/deadline_adaptor_for_cinema4d/test_copyright_headers.py +++ b/test/unit/deadline_adaptor_for_cinema4d/test_copyright_headers.py @@ -7,9 +7,6 @@ _copyright_header_re = re.compile( r"Copyright Amazon\.com, Inc\. or its affiliates\. All Rights Reserved\.", re.IGNORECASE ) -_generated_by_scm = re.compile( - r"# file generated by (setuptools[-_]scm|vcs-versioning)", re.IGNORECASE -) class FileMissingCopyRight(Exception): @@ -43,17 +40,7 @@ def _check_file(filename: Path) -> None: def _is_version_file(filename: Path) -> bool: - if filename.name != "_version.py": - return False - with open(filename) as infile: - lines_read = 0 - for line in infile: - if _generated_by_scm.search(line): - return True - lines_read += 1 - if lines_read > 10: - break - return False + return filename.name == "_version.py" def test_copyright_headers():