Skip to content

test: disable coverage tests #1771

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 2 additions & 45 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,6 @@ def run_unit(session, install_test_extra):
"py.test",
"--quiet",
f"--junitxml=unit_{session.python}_sponge_log.xml",
"--cov=bigframes",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would prefer we keep coverage on the unit tests. It is a useful tool for identifying when we miss a test for business logic. Okay to remove from system tests and adjust our pass number, though.

f"--cov={tests_path}",
"--cov-append",
"--cov-config=.coveragerc",
"--cov-report=term-missing",
"--cov-fail-under=0",
tests_path,
third_party_tests_path,
scripts_path,
Expand Down Expand Up @@ -370,16 +364,7 @@ def run_system(
]
)
if check_cov:
pytest_cmd.extend(
[
"--cov=bigframes",
f"--cov={test_folder}",
"--cov-append",
"--cov-config=.coveragerc",
"--cov-report=term-missing",
"--cov-fail-under=0",
]
)
pass

pytest_cmd.extend(extra_pytest_options)
session.run(
Expand Down Expand Up @@ -461,29 +446,7 @@ def cover(session):
This outputs the coverage report aggregating coverage from the test runs
(including system test runs), and then erases coverage data.
"""
session.install("coverage", "pytest-cov")

# Create a coverage report that includes only the product code.
session.run(
"coverage",
"report",
"--include=bigframes/*",
"--show-missing",
"--fail-under=85",
)

# Make sure there is no dead code in our test directories.
session.run(
"coverage",
"report",
"--show-missing",
"--include=tests/unit/*",
"--include=tests/system/small/*",
# TODO(b/353775058) resume coverage to 100 when the issue is fixed.
"--fail-under=99",
)

session.run("coverage", "erase")
pass


@nox.session(python=DEFAULT_PYTHON_VERSION)
Expand Down Expand Up @@ -690,12 +653,6 @@ def prerelease(session: nox.sessions.Session, tests_path, extra_pytest_options=(
# Any individual test taking longer than 10 mins will be terminated.
"--timeout=600",
f"--junitxml={os.path.split(tests_path)[-1]}_prerelease_{session.python}_sponge_log.xml",
"--cov=bigframes",
f"--cov={tests_path}",
"--cov-append",
"--cov-config=.coveragerc",
"--cov-report=term-missing",
"--cov-fail-under=0",
tests_path,
*extra_pytest_options,
*session.posargs,
Expand Down
Loading