-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove setUpTestData from PlaywrightTestCase
Remove `setUpTestData` from `PlaywrightTestCase` because it doesn't work call this from `setUpClass`, because all data will be removed after the first test. The `PlaywrightTestCase` used `StaticLiveServerTestCase` that inherits from `TransactionTestCase` that will flush the database after each tests. The `LiveServerTestCase` doc string says: ``` It inherits from TransactionTestCase instead of TestCase because the threads don't share the same transactions (unless if using in-memory sqlite) and each thread needs to commit all their transactions so that the other thread can see the changes. ``` See also: https://code.djangoproject.com/ticket/23640 We can call `setUpTestData` from `setUp`. But the class method `setUpTestData` originally stands for initializing test data for the entire test case, so don't do this. It's up to the child class how to create initial test data. Raise a warning if there is a `setUpTestData` to clarify that it's not usable. Additional fixes: Remove pytest warning by add the marker to `[tool.pytest.ini_options]`: ``` PytestUnknownMarkWarning: Unknown pytest.mark.playwright - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.playwright ``` Split github actions PyPi cache, see: python-poetry/poetry#4568
- Loading branch information
Jens Diemer
committed
Sep 21, 2022
1 parent
6edc656
commit ed4ebc6
Showing
6 changed files
with
15 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '33' | ||
__version__ = '34' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters