mirror of
https://github.com/actions/setup-python.git
synced 2025-06-28 21:53:47 +00:00
Fix desugaring of 3.13.1t
and add test case.
This commit is contained in:
parent
c70f76ebc5
commit
d653c0b66e
3 changed files with 44 additions and 14 deletions
18
__tests__/find-python.test.ts
Normal file
18
__tests__/find-python.test.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
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);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue