Skip to content

Disable sorting tests for Python 2.7 as isort5 is not compatible with Python 2.7 #13550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/3 Code Health/13542.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Disable sorting tests for Python 2.7 as isort5 is not compatible with Python 2.7.
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IntelliSense
jedi==0.17.2
# Sort Imports
isort==5.3.2
isort==5.3.2; python_version >= '3.6'
# DS Python daemon
python-jsonrpc-server==0.2.0
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
future==0.18.2 \
--hash=sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d \
# via python-jsonrpc-server
isort==5.3.2 \
isort==5.3.2 ; python_version >= "3.6" \
--hash=sha256:5196bd2f5b23dc91215734b1c96c6d28390061d69860a948094c12635d6d64e6 \
--hash=sha256:ba83762132a8661d3525f87a86549712fb7d8da79eeb452e01f327ada9e87920 \
# via -r requirements.in
Expand Down
13 changes: 12 additions & 1 deletion src/test/format/extension.sort.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,18 @@ suite('Sorting', () => {
let ioc: UnitTestIocContainer;
let sorter: ISortImportsEditingProvider;
const configTarget = IS_MULTI_ROOT_TEST ? ConfigurationTarget.WorkspaceFolder : ConfigurationTarget.Workspace;
suiteSetup(initialize);
suiteSetup(async function () {
const pythonVersion = process.env.CI_PYTHON_VERSION // GHA uses this
? parseFloat(process.env.CI_PYTHON_VERSION)
: process.env.PythonVersion // Azdo uses this
? parseFloat(process.env.PythonVersion)
: undefined;
if (pythonVersion && pythonVersion < 3) {
// tslint:disable-next-line:no-invalid-this
return this.skip();
}
await initialize();
});
suiteTeardown(async () => {
fs.writeFileSync(fileToFormatWithConfig, fs.readFileSync(originalFileToFormatWithConfig));
fs.writeFileSync(fileToFormatWithConfig1, fs.readFileSync(originalFileToFormatWithConfig1));
Expand Down