Skip to content

Commit

Permalink
labm8/py/test: Move global conftest into //labm8/py/internal.
Browse files Browse the repository at this point in the history
This moves the conftest.py file at the root of the WORKSPACE into a
module in //labm8/py/internal that is explicitly loaded as a plugin by
//labm8/py:test.

This is part of the ongoing process to eliminate conftest.py files
from the repo and to enable --noconftest arg in pytest.

github.com/ChrisCummins/phd/issues/70

Signed-off-by: format 2020.01.16 <github.com/ChrisCummins/format>
  • Loading branch information
ChrisCummins committed Jan 25, 2020
1 parent 6de7bf1 commit cf0b0c4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion labm8/py/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ py_library(
visibility = ["//visibility:public"],
deps = [
":app",
"//:conftest",
"//labm8/py/internal:pytest_plugin",
"//third_party/py/pytest",
],
)
Expand Down
12 changes: 12 additions & 0 deletions labm8/py/internal/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,15 @@ python_proto_library(
visibility = ["//labm8/py:__subpackages__"],
deps = [":logging_pb"],
)

py_library(
name = "pytest_plugin",
testonly = 1,
srcs = ["pytest_plugin.py"],
visibility = ["//labm8/py:__subpackages__"],
deps = [
"//:build_info",
"//labm8/py:app",
"//third_party/py/pytest",
],
)

0 comments on commit cf0b0c4

Please sign in to comment.