mirror of
https://github.com/actions/setup-python.git
synced 2024-11-22 07:00:57 -05:00
8c5ea631b2
* add support to install pypy * resolved comments, update readme, add e2e tests. * resolve throw error * Add pypy unit tests to cover code * add tests * Update test-pypy.yml * Update test-python.yml * Update test-python.yml * Update README.md * fixing tests * change order Co-authored-by: Maxim Lobanov <v-malob@microsoft.com> * add pypy tests and fix issue with pypy-3-nightly Co-authored-by: Maxim Lobanov <v-malob@microsoft.com>
34 lines
760 B
TypeScript
34 lines
760 B
TypeScript
import {
|
|
validateVersion,
|
|
validatePythonVersionFormatForPyPy
|
|
} from '../src/utils';
|
|
|
|
describe('validatePythonVersionFormatForPyPy', () => {
|
|
it.each([
|
|
['3.6', true],
|
|
['3.7', true],
|
|
['3.6.x', false],
|
|
['3.7.x', false],
|
|
['3.x', false],
|
|
['3', false]
|
|
])('%s -> %s', (input, expected) => {
|
|
expect(validatePythonVersionFormatForPyPy(input)).toEqual(expected);
|
|
});
|
|
});
|
|
|
|
describe('validateVersion', () => {
|
|
it.each([
|
|
['v7.3.3', true],
|
|
['v7.3.x', true],
|
|
['v7.x', true],
|
|
['x', true],
|
|
['v7.3.3-rc.1', true],
|
|
['nightly', true],
|
|
['v7.3.b', false],
|
|
['3.6', true],
|
|
['3.b', false],
|
|
['3', true]
|
|
])('%s -> %s', (input, expected) => {
|
|
expect(validateVersion(input)).toEqual(expected);
|
|
});
|
|
});
|