mirror of
https://code.forgejo.org/actions/setup-python
synced 2025-06-08 04:18:19 +02:00
Add range validation for toml files (#726)
This commit is contained in:
parent
f97b83114c
commit
65d7f2d534
4 changed files with 29 additions and 6 deletions
|
@ -107,7 +107,7 @@ describe('Version from file test', () => {
|
|||
await io.mkdirP(tempDir);
|
||||
const pythonVersionFileName = 'pyproject.toml';
|
||||
const pythonVersionFilePath = path.join(tempDir, pythonVersionFileName);
|
||||
const pythonVersion = '>=3.7';
|
||||
const pythonVersion = '>=3.7.0';
|
||||
const pythonVersionFileContent = `[project]\nrequires-python = "${pythonVersion}"`;
|
||||
fs.writeFileSync(pythonVersionFilePath, pythonVersionFileContent);
|
||||
expect(_fn(pythonVersionFilePath)).toEqual([pythonVersion]);
|
||||
|
@ -119,7 +119,7 @@ describe('Version from file test', () => {
|
|||
await io.mkdirP(tempDir);
|
||||
const pythonVersionFileName = 'pyproject.toml';
|
||||
const pythonVersionFilePath = path.join(tempDir, pythonVersionFileName);
|
||||
const pythonVersion = '>=3.7';
|
||||
const pythonVersion = '>=3.7.0';
|
||||
const pythonVersionFileContent = `[tool.poetry.dependencies]\npython = "${pythonVersion}"`;
|
||||
fs.writeFileSync(pythonVersionFilePath, pythonVersionFileContent);
|
||||
expect(_fn(pythonVersionFilePath)).toEqual([pythonVersion]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue