mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-10 21:07:48 +00:00
[python] Fix error message for discontinued Python 3.6 (#8300)
This fixes the error message when a discontinued version of python (for example, Python 3.6) is detected. https://vercel.com/changelog/python-3-6-is-being-deprecated
This commit is contained in:
22
packages/python/test/integration.test.ts
vendored
22
packages/python/test/integration.test.ts
vendored
@@ -71,8 +71,30 @@ it('should match the probes against Python dev servers', async () => {
|
||||
}
|
||||
});
|
||||
|
||||
const testsThatFailToBuild = new Map([
|
||||
['30-fail-build-invalid-pipfile', 'Unable to parse Pipfile.lock'],
|
||||
[
|
||||
'31-fail-build-invalid-python36',
|
||||
'Python version "3.6" detected in Pipfile.lock is discontinued and must be upgraded.',
|
||||
],
|
||||
]);
|
||||
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const fixture of fs.readdirSync(fixturesPath)) {
|
||||
const errMsg = testsThatFailToBuild.get(fixture);
|
||||
if (errMsg) {
|
||||
// eslint-disable-next-line no-loop-func
|
||||
it(`should fail to build ${fixture}`, async () => {
|
||||
try {
|
||||
await testDeployment(path.join(fixturesPath, fixture));
|
||||
} catch (err) {
|
||||
expect(err).toBeTruthy();
|
||||
expect(err.deployment).toBeTruthy();
|
||||
expect(err.deployment.errorMessage).toBe(errMsg);
|
||||
}
|
||||
});
|
||||
continue; //eslint-disable-line
|
||||
}
|
||||
// eslint-disable-next-line no-loop-func
|
||||
it(`should build ${fixture}`, async () => {
|
||||
await expect(
|
||||
|
||||
Reference in New Issue
Block a user