Skip to content

Commit

Permalink
Fix tests: PythonReqs.sdist_in_place, PythonReqs.buildpython, StaticP…
Browse files Browse the repository at this point in the history
…roxy.buildpython
  • Loading branch information
mhsmith committed Jul 20, 2023
1 parent 1766346 commit 937e516
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ jobs:
outputs:
agp-versions: ${{ steps.agp-versions.outputs.versions }}

test-integration:
integration:
needs: [build-product]
strategy:
fail-fast: false
matrix:
# We pin specific OS versions, because we need them to be compatible with the
# Python `extra-versions` listed below.
os: [macos-12, ubuntu-20.04, windows-2022]
agp-version: ${{ fromJSON(needs.build-product.outputs.agp-versions) }}
os: [macos-12, ubuntu-20.04, windows-2022]

runs-on: ${{ matrix.os }}
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

assert __file__ == os.path.abspath(
f"{os.environ['integration_dir']}/../../../build/test/integration/"
f"{os.environ['AGP_VERSION']}/PythonReqs/sdist_in_place/project/"
f"{os.environ['CHAQUOPY_AGP_VERSION']}/PythonReqs/sdist_in_place/project/"
f"app/sdist_in_place/setup.py"
), __file__

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -634,9 +634,9 @@ class BuildPython(GradleTestCase):
r"\* Then scroll up to see the full output.")

@classmethod
def old_version_error(cls, version):
def old_version_error(cls):
return (fr"buildPython must be version {MIN_BUILD_PYTHON_VERSION} or later: "
fr"this is version {version}\.\d+\. " + cls.SEE)
fr"this is version {OLD_BUILD_PYTHON_VERSION}\.\d+\. " + cls.SEE)

# Default buildPython depends on selected Python version.
def test_default(self):
Expand Down Expand Up @@ -765,7 +765,7 @@ def test_buildpython(self):

run = self.RunGradle(*layers, env={"buildpython_version": OLD_BUILD_PYTHON_VERSION},
succeed=False)
self.assertInLong(BuildPython.old_version_error(version), run.stderr, re=True)
self.assertInLong(BuildPython.old_version_error(), run.stderr, re=True)

def test_buildpython_missing(self):
run = self.RunGradle(
Expand Down Expand Up @@ -1425,7 +1425,7 @@ def test_buildpython(self):

run = self.RunGradle(*layers, env={"buildpython_version": OLD_BUILD_PYTHON_VERSION},
succeed=False)
self.assertInLong(BuildPython.old_version_error(version), run.stderr, re=True)
self.assertInLong(BuildPython.old_version_error(), run.stderr, re=True)

def test_buildpython_missing(self):
run = self.RunGradle(
Expand Down

0 comments on commit 937e516

Please sign in to comment.