Skip to content

Commit

Permalink
[#67] Move the declaration of pytest_plugins to a top-level conftest.py
Browse files Browse the repository at this point in the history
This is what has been preventing us from running just the command "pytest"
instead of "pytest hlink/tests". pytest requires pytest_plugins to be
defined in a top-level conftest.py file. See here for their reasons:
https://docs.pytest.org/en/stable/deprecations.html#pytest-plugins-in-non-top-level-conftest-files.
  • Loading branch information
riley-harper committed Dec 12, 2022
1 parent fa383d3 commit 52bbf21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 4 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pytest_plugins = (
"hlink.tests.plugins.datasources",
"hlink.tests.plugins.external_data_paths",
)
6 changes: 0 additions & 6 deletions hlink/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@
from types import SimpleNamespace


pytest_plugins = (
"hlink.tests.plugins.datasources",
"hlink.tests.plugins.external_data_paths",
)


def load_table_from_csv(link_task, path, table_name):
link_task.spark.read.csv(path, header=True, inferSchema=True).write.mode(
"overwrite"
Expand Down

0 comments on commit 52bbf21

Please sign in to comment.