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

PLAT-154: Migrate test_external #1127

Merged
merged 5 commits into from
Dec 12, 2023

Conversation

ethho
Copy link
Contributor

@ethho ethho commented Dec 11, 2023

  • cp to tests
  • nose2pytest test_external
  • Use pytest tmpdir fixtures for mocking stores
  • Migrate test_external
  • Format with black

@ethho ethho requested a review from A-Baji December 11, 2023 23:12
@ethho ethho marked this pull request as ready for review December 11, 2023 23:12
@@ -176,23 +175,52 @@ def connection_test(connection_root):


@pytest.fixture(scope="session")
def stores_config():
def stores_config(tmpdir_factory):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you explain tmpdir_factory for me?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's similar to the builtin tmpdir, except that it's a fixture that will ensure that the temp dirs for different tests have different base directories. Not as important in this case, since the fixture is session-scoped, but if we changed the scope to function this would be important.

https://docs.pytest.org/en/6.2.x/tmpdir.html#the-tmpdir-factory-fixture

@A-Baji A-Baji merged commit a6b4777 into datajoint:dev-tests Dec 12, 2023
9 checks passed
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