diff --git a/test/integration/test_b2_command_line.py b/test/integration/test_b2_command_line.py index 038cd9c60..6efd510c0 100755 --- a/test/integration/test_b2_command_line.py +++ b/test/integration/test_b2_command_line.py @@ -1515,8 +1515,12 @@ def test_license(b2_tool, with_packages, cli_version): ) if with_packages: + # In the case of e.g.: docker image, it has a license built-in with a `b2`. + # It also is unable to generate this license because it lacks required packages. + # Thus, I'm allowing here for the test of licenses to pass whenever + # the binary is named `b2` or with the proper cli version string (e.g. `_b2v4` or `b2v3`). full_license_re = re.compile( - fr'Licenses of all modules used by {cli_version}(\.EXE)?, shipped with it in binary form:\r?\n' + fr'Licenses of all modules used by ({cli_version}|b2)(\.EXE)?, shipped with it in binary form:\r?\n' r'\+-*\+-*\+\r?\n' r'\|\s*Module name\s*\|\s*License text\s*\|\r?\n' r'.*' @@ -1531,8 +1535,9 @@ def test_license(b2_tool, with_packages, cli_version): # 'colorlog', 'virtualenv', 'nox', 'packaging', 'argcomplete', 'filelock' # that sum up to around 50k characters. Tests ran from docker image are unaffected. + # See the explanation above for why both `b2` and `cli_version` are allowed here. license_summary_re = re.compile( - fr'Summary of all modules used by {cli_version}(\.EXE)?, shipped with it in binary form:\r?\n' + fr'Summary of all modules used by ({cli_version}|b2)(\.EXE)?, shipped with it in binary form:\r?\n' r'\+-*\+-*\+-*\+-*\+-*\+\r?\n' r'\|\s*Module name\s*\|\s*Version\s*\|\s*License\s*\|\s*Author\s*\|\s*URL\s*\|\r?\n' r'.*'