Skip to content

Commit

Permalink
Allow conda's generated files.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bottler authored and facebook-github-bot committed Apr 6, 2020
1 parent b87058c commit 29b9c44
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,17 @@ def test_copyright(self):
+ " 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(("# -*-", "#!")):
Expand Down

0 comments on commit 29b9c44

Please sign in to comment.