From 29b9c44c0a467a624a111af5cea8b173a1340c1e Mon Sep 17 00:00:00 2001 From: Jeremy Reizenstein Date: Mon, 6 Apr 2020 10:01:31 -0700 Subject: [PATCH] Allow conda's generated files. Summary: The conda build process generates some files of its own, which we don't want to catch in our test for copyright notices. Reviewed By: nikhilaravi, patricklabatut Differential Revision: D20868566 fbshipit-source-id: 76a786a3eb9a674d59e630cc06f346e8b82258a4 --- tests/test_build.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_build.py b/tests/test_build.py index 7cfd3011..72c2b39b 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -55,8 +55,17 @@ class TestBuild(unittest.TestCase): + " All rights reserved.\n" ) + conda_generated_files = [ + "run_test.py", + "run_test.sh", + "conda_test_runner.sh", + "conda_test_env_vars.sh", + ] + for extension in extensions: for i in root_dir.glob(f"**/*.{extension}"): + if i.name in conda_generated_files: + continue with open(i) as f: firstline = f.readline() if firstline.startswith(("# -*-", "#!")):