Skip to content

Commit 2a877cb

Browse files
feat: add test for capturing python_version entries in pyproject tool tables
1 parent 478d322 commit 2a877cb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/python-version-patterns.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ describe('findPythonVersionMatches', () => {
5656
expect(matches.map((match) => match.matched)).toEqual(['3.10.8']);
5757
});
5858

59+
it('captures python_version entries in pyproject tool tables', () => {
60+
const content = `[tool.mypy]\npython_version = "3.10.8"`;
61+
const matches = findPythonVersionMatches('pyproject.toml', content);
62+
63+
expect(matches.map((match) => match.matched)).toEqual(['3.10.8']);
64+
});
65+
5966
it('finds pinned versions in tox.ini', () => {
6067
const content = `python_version = 3.7.17\nbasepython = python3.7.17`;
6168
const matches = findPythonVersionMatches('tox.ini', content);

0 commit comments

Comments
 (0)