Skip to content

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

@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
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