summaryrefslogtreecommitdiffstats
path: root/test/Scanner/Python
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2023-02-20 18:43:59 (GMT)
committerMats Wichmann <mats@linux.com>2023-05-21 12:48:55 (GMT)
commit14a58022619c81533bcc7fe1f026dd02409235b3 (patch)
tree86f40f99f1fcfaf5b7629d0bc8e40c6a2c7436c7 /test/Scanner/Python
parentd7ed1c6b91b93e70aae63fdd1e397a37cfec024b (diff)
downloadSCons-14a58022619c81533bcc7fe1f026dd02409235b3.zip
SCons-14a58022619c81533bcc7fe1f026dd02409235b3.tar.gz
SCons-14a58022619c81533bcc7fe1f026dd02409235b3.tar.bz2
Add a copyright header to test files
A lot of files that are not the main test scripts had no license/copyright headers. This change adds those. In a small number of cases, this necessitaed a change to an expected line number from a failure/exception message. Along the way, some are lightly reformatted and some add a DefaultEnvironment call. Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test/Scanner/Python')
-rw-r--r--test/Scanner/Python/SConstruct7
-rw-r--r--test/Scanner/Python/script.py4
-rw-r--r--test/Scanner/Python/to_be_copied/__init__.py6
3 files changed, 15 insertions, 2 deletions
diff --git a/test/Scanner/Python/SConstruct b/test/Scanner/Python/SConstruct
index 988cf60..6a3fd05 100644
--- a/test/Scanner/Python/SConstruct
+++ b/test/Scanner/Python/SConstruct
@@ -1,5 +1,10 @@
+# SPDX-License-Identifier: MIT
+#
+# Copyright The SCons Foundation
+
import sys
+DefaultEnvironment(tools=[])
env = Environment(tools=['python'])
# Copy each file individually instead of copying the dir. This has the benefit
@@ -13,4 +18,4 @@ for srcNode in srcDir.glob('*'):
# Don't set a dependency on the copy actions on purpose. Scanner should find
# the dependencies automatically.
-env.Command('a.out', 'script.py', '$PYTHON $SOURCE $TARGET', PYTHON=sys.executable) \ No newline at end of file
+env.Command('a.out', 'script.py', '$PYTHON $SOURCE $TARGET', PYTHON=sys.executable)
diff --git a/test/Scanner/Python/script.py b/test/Scanner/Python/script.py
index 105a575..e51ec41 100644
--- a/test/Scanner/Python/script.py
+++ b/test/Scanner/Python/script.py
@@ -1,3 +1,7 @@
+# SPDX-License-Identifier: MIT
+#
+# Copyright The SCons Foundation
+
import package1 # noqa: F401
import package2 # noqa: F401
import sys
diff --git a/test/Scanner/Python/to_be_copied/__init__.py b/test/Scanner/Python/to_be_copied/__init__.py
index 3c1c05b..bd9464c 100644
--- a/test/Scanner/Python/to_be_copied/__init__.py
+++ b/test/Scanner/Python/to_be_copied/__init__.py
@@ -1 +1,5 @@
-from . import helper # noqa: F401 \ No newline at end of file
+# SPDX-License-Identifier: MIT
+#
+# Copyright The SCons Foundation
+
+from . import helper # noqa: F401