Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,14 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
on a one-time uuid to make a path to the file.
- Clarify VariantDir behavior when switching to not duplicate sources
and tweak wording a bit.
<<<<<<< feature/py315
- Test suite: add support for Python 3.15 in the Action unit tests.
=======
- Update documentation of the three file-finding functions in the API
(FindFile, FindInstalledFiles, FindSourceFiles) as well as FindPathDirs.
Also add a test for FindFile to be sure it locates non-existing
derived files as advertised.
>>>>>>> master
- zip tool now uses zipfile module's "from_file" method to populate
ZipInfo records, rather than doing manually.
- Update documentation for linking-related construction variables.
Expand Down
1 change: 1 addition & 0 deletions RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ long function signature lines, and some linting-insipired cleanups.

- Test suite: end to end tests don't use assert in result checks

- Test suite: add support for Python 3.15 in the Action unit tests.
- zip tool now uses zipfile module's "from_file" method to populate ZipInfo
records, rather than doing manually.

Expand Down
15 changes: 14 additions & 1 deletion SCons/ActionTests.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ def __call__(self) -> None:
import sys
import types
import unittest
from unittest import mock
from subprocess import PIPE
from typing import TYPE_CHECKING
from unittest import mock

# If assertEqual truncates strings so it's hard to see the diff, enable this:
# if 'unittest.util' in __import__('sys').modules:
Expand Down Expand Up @@ -1557,6 +1557,7 @@ def LocalFunc() -> None:
(3, 12): bytearray(b'0, 0, 0, 0,(),(),(\x97\x00y\x00),(),()'),
(3, 13): bytearray(b'0, 0, 0, 0,(),(),(\x95\x00g\x00),(),()'),
(3, 14): bytearray(b'0, 0, 0, 0,(),(),(\x80\x00R\x00#\x00),(),()'),
(3, 15): bytearray(b'0, 0, 0, 0,(),(),(\x80\x00\x00\x00Q\x00!\x00),(),()'),
}

meth_matches = [
Expand Down Expand Up @@ -1738,6 +1739,7 @@ def LocalFunc() -> None:
(3, 12): bytearray(b'0, 0, 0, 0,(),(),(\x97\x00y\x00),(),()'),
(3, 13): bytearray(b'0, 0, 0, 0,(),(),(\x95\x00g\x00),(),()'),
(3, 14): bytearray(b'0, 0, 0, 0,(),(),(\x80\x00R\x00#\x00),(),()'),
(3, 15): bytearray(b'0, 0, 0, 0,(),(),(\x80\x00\x00\x00Q\x00!\x00),(),()'),

}

Expand All @@ -1750,6 +1752,8 @@ def LocalFunc() -> None:
(3, 12): bytearray(b'1, 1, 0, 0,(),(),(\x97\x00y\x00),(),()'),
(3, 13): bytearray(b'1, 1, 0, 0,(),(),(\x95\x00g\x00),(),()'),
(3, 14): bytearray(b'1, 1, 0, 0,(),(),(\x80\x00R\x00#\x00),(),()'),
(3, 15): bytearray(b'1, 1, 0, 0,(),(),(\x80\x00\x00\x00Q\x00!\x00),(),()'),

}

def factory(act, **kw):
Expand Down Expand Up @@ -1991,6 +1995,7 @@ def LocalFunc() -> None:
(3, 12): bytearray(b'0, 0, 0, 0,(),(),(\x97\x00y\x00),(),()'),
(3, 13): bytearray(b'0, 0, 0, 0,(),(),(\x95\x00g\x00),(),()'),
(3, 14): bytearray(b'0, 0, 0, 0,(),(),(\x80\x00R\x00#\x00),(),()'),
(3, 15): bytearray(b'0, 0, 0, 0,(),(),(\x80\x00\x00\x00Q\x00!\x00),(),()'),
}

meth_matches = [
Expand Down Expand Up @@ -2054,6 +2059,7 @@ def LocalFunc() -> None:
(3, 12): b'\x97\x00y\x00',
(3, 13): b'\x95\x00g\x00',
(3, 14): b'\x80\x00R\x00#\x00',
(3, 15): b'\x80\x00\x00\x00Q\x00!\x00',
}

with self.subTest():
Expand Down Expand Up @@ -2260,6 +2266,7 @@ def func1(a, b, c):
(3, 12): (bytearray(b"3, 3, 0, 0,(),(),(\x97\x00|\x00S\x00),(),()"),),
(3, 13): (bytearray(b"3, 3, 0, 0,(),(),(\x95\x00U\x00$\x00),(),()"),),
(3, 14): (bytearray(b"3, 3, 0, 0,(),(),(\x80\x00V\x00#\x00),(),()"),),
(3, 15): bytearray(b'3, 3, 0, 0,(),(),(\x80\x00\x00\x00U\x00!\x00),(),()'),
}

c = SCons.Action._function_contents(func1)
Expand Down Expand Up @@ -2301,6 +2308,9 @@ def test_object_contents(self) -> None:
(3, 14): bytearray(
b"{TestClass:__main__}[[[(<class 'object'>, ()), [(<class '__main__.TestClass'>, (<class 'object'>,))]]]]{{1, 1, 0, 0,(a,b),(a,b),(\x80\x00R\x00V\x00n\x00\x00\x00\x00\x00\x00\x00\x00\x00R\x01V\x00n\x01\x00\x00\x00\x00\x00\x00\x00\x00R\x02#\x00),(),(),2, 2, 0, 0,(),(),(\x80\x00R\x00#\x00),(),()}}{{{a=a,b=b}}}"
),
(3, 15): bytearray(
b"{TestClass:__main__}[[[(<class 'object'>, ()), [(<class '__main__.TestClass'>, (<class 'object'>,))]]]]{{1, 1, 0, 0,(a,b),(a,b),(\x80\x00\x00\x00Q\x00U\x00m\x00\x00\x00\x00\x00\x00\x00\x00\x00Q\x01U\x00m\x01\x00\x00\x00\x00\x00\x00\x00\x00Q\x02!\x00),(),(),2, 2, 0, 0,(),(),(\x80\x00\x00\x00Q\x00!\x00),(),()}}{{{a=a,b=b}}}"
),
}
self.assertEqual(c, expected[sys.version_info[:2]])

Expand Down Expand Up @@ -2336,6 +2346,9 @@ def test_code_contents(self) -> None:
(3, 14): bytearray(
b"0, 0, 0, 0,(Hello, World!),(print),(\x80\x00]\x00!\x00R\x004\x01\x00\x00\x00\x00\x00\x00\x1f\x00R\x01#\x00)"
),
(3, 15): bytearray(
b"0, 0, 0, 0,(Hello, World!),(print),(\x80\x00\x00\x00\\\x00\x1f\x00Q\x002\x01\x00\x00\x00\x00\x00\x00\x1d\x00Q\x01!\x00)"
),
}

self.assertEqual(c, expected[sys.version_info[:2]])
Expand Down
Loading