1
0
Fork 0
mirror of https://github.com/actions/setup-python.git synced 2025-01-31 02:46:56 +00:00
setup-python/__tests__/find-python.test.ts

19 lines
613 B
TypeScript
Raw Normal View History

import {desugarVersion} from '../src/find-python';
describe('desugarVersion', () => {
it.each([
['3.13', ['3.13', '']],
['3.13t', ['3.13', '-freethreaded']],
['3.13.1', ['3.13.1', '']],
['3.13.1t', ['3.13.1', '-freethreaded']],
['3.14-dev', ['~3.14.0-0', '']],
['3.14t-dev', ['~3.14.0-0', '-freethreaded']],
['3.14.0a4', ['3.14.0a4', '']],
['3.14.0ta4', ['3.14.0a4', '-freethreaded']],
['3.14.0rc1', ['3.14.0rc1', '']],
['3.14.0trc1', ['3.14.0rc1', '-freethreaded']]
])('%s -> %s', (input, expected) => {
expect(desugarVersion(input)).toEqual(expected);
});
});