Skip to content

chore: fix tests and improve tests stability#1007

Merged
vdusek merged 4 commits intoapify:masterfrom
Mantisus:tests-fixes
Feb 21, 2025
Merged

chore: fix tests and improve tests stability#1007
vdusek merged 4 commits intoapify:masterfrom
Mantisus:tests-fixes

Conversation

@Mantisus
Copy link
Copy Markdown
Collaborator

Description

  • Fix kvs isolation in the use_state test for AdaptivePlaywrightCrawler
  • Separate isolation cookie tests for httpx and curl. Having httpx use respx instead of httpbin will increase the stability of the test.
  • Update some PlaywrightCrawler tests to use route instead of httpbin. This will speed up execution time and improve stability. It will also probably be useful for Prepare universal http interceptor for both static and browser crawlers tests #929 in future

@Mantisus Mantisus requested review from Pijukatel and vdusek February 21, 2025 01:25
@Mantisus Mantisus changed the title chore: fix test and improve test stability chore: fix tests and improve tests stability Feb 21, 2025
@Mantisus Mantisus self-assigned this Feb 21, 2025
Comment on lines +79 to +83
@pytest.fixture
async def key_value_store() -> AsyncGenerator[KeyValueStore, None]:
kvs = await KeyValueStore.open()
yield kvs
await kvs.drop()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just wondering whether to put this into conftest and utilize this fixture across different test modules?

@Mantisus Mantisus requested a review from vdusek February 21, 2025 13:24
Copy link
Copy Markdown
Collaborator

@vdusek vdusek left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

@vdusek vdusek merged commit 179ec93 into apify:master Feb 21, 2025
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.

3 participants