Skip to content
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

Fix failing python 3.8 unittests on MacOS #2436

Merged
merged 1 commit into from
Mar 24, 2024

Conversation

deathaxe
Copy link
Contributor

This commit adopts unittesting.ViewTestCase to run view related test cases.

ViewTestCase ...

  1. provides view and window members pointing to a dedicated view, being created for testing.
  2. ensures not to close empty windows, which was probably the most likely reason for unittests failing before on MacOS.

This commit adopts `unittesting.ViewTestCase` to run view related test cases.

ViewTestCase ...

1. provides `view` and `window` members pointing to a dedicated view, being
   created for testing.
2. ensures not to close empty windows, which was probably the most likely
   reason for unittests failing before on MacOS.
@deathaxe deathaxe changed the title Fix failing unittests on MacOS Fix failing python 3.8 unittests on MacOS Mar 24, 2024
@deathaxe
Copy link
Contributor Author

Note: Various test cases don't seem to properly create dedicated windows for testing.

I therefore managed to destroy my open workspace due to running LSP unittests locally.

Copy link
Member

@predragnikolic predragnikolic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks,

I left this comment here https://github.com/sublimelsp/LSP/pull/2436/files#r1536919851
If we conclude that the order needs to be as it was, I will change it my PR.

@predragnikolic predragnikolic merged commit 7f5431e into sublimelsp:feat/py38 Mar 24, 2024
@predragnikolic predragnikolic mentioned this pull request Mar 24, 2024
@deathaxe deathaxe deleted the feat/py38 branch April 2, 2024 16:57
predragnikolic added a commit that referenced this pull request Apr 19, 2024
* "Add .python-version file"

* remove pathlib from dependencies

* change import

* Revert "change import" (:

This reverts commit c70cd57.

* Fix failing unittests on MacOS (#2436)

This commit adopts `unittesting.ViewTestCase` to run view related test cases.

ViewTestCase ...

1. provides `view` and `window` members pointing to a dedicated view, being
   created for testing.
2. ensures not to close empty windows, which was probably the most likely
   reason for unittests failing before on MacOS.

* keep the same order as before

* rchlint

* add release notes

* tweak release message

* Be more descriptive of what the user expect, or what the user can do if things go wrong

* tweak words

* fix typos

---------

Co-authored-by: Rafal Chlodnicki <rafal@squareup.com>
Co-authored-by: deathaxe <deathaxe82@googlemail.com>
Co-authored-by: Raoul Wols <raoulwols@gmail.com>
Co-authored-by: Predrag <predrag@Predrags-Laptop.local>
predragnikolic added a commit that referenced this pull request Apr 20, 2024
* "Add .python-version file"

* remove pathlib from dependencies

* change import

* Revert "change import" (:

This reverts commit c70cd57.

* Fix failing unittests on MacOS (#2436)

This commit adopts `unittesting.ViewTestCase` to run view related test cases.

ViewTestCase ...

1. provides `view` and `window` members pointing to a dedicated view, being
   created for testing.
2. ensures not to close empty windows, which was probably the most likely
   reason for unittests failing before on MacOS.

* keep the same order as before

* rchlint

* add release notes

* tweak release message

* Be more descriptive of what the user expect, or what the user can do if things go wrong

* tweak words

* Use variable annotations instead of type comments

---------

Co-authored-by: Предраг Николић <idmpepe@gmail.com>
Co-authored-by: Rafal Chlodnicki <rafal@squareup.com>
Co-authored-by: deathaxe <deathaxe82@googlemail.com>
Co-authored-by: Raoul Wols <raoulwols@gmail.com>
predragnikolic added a commit that referenced this pull request Apr 20, 2024
…2446)

* "Add .python-version file"

* remove pathlib from dependencies

* change import

* Revert "change import" (:

This reverts commit c70cd57.

* Fix failing unittests on MacOS (#2436)

This commit adopts `unittesting.ViewTestCase` to run view related test cases.

ViewTestCase ...

1. provides `view` and `window` members pointing to a dedicated view, being
   created for testing.
2. ensures not to close empty windows, which was probably the most likely
   reason for unittests failing before on MacOS.

* keep the same order as before

* rchlint

* add release notes

* Import from enum and typing modules

* Keep using fake enums

* Import remaining classes from typing_extensions

* Fix enum types and import from enum module

* Quoted type annotation not needed anymore with the ParamSpec from typing_extensions

---------

Co-authored-by: Предраг Николић <idmpepe@gmail.com>
Co-authored-by: Rafal Chlodnicki <rafal@squareup.com>
Co-authored-by: deathaxe <deathaxe82@googlemail.com>
Co-authored-by: Raoul Wols <raoulwols@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants