Skip to content

Commit 78d871a

Browse files
committed
add pytest warning file
Will throw a warning to remove show_plots after the cutoff date.
1 parent 627b2bc commit 78d871a

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#
2+
# ISC License
3+
#
4+
# Copyright (c) 2026, Autonomous Vehicle Systems Lab, University of Colorado at Boulder
5+
#
6+
# Permission to use, copy, modify, and/or distribute this software for any
7+
# purpose with or without fee is hereby granted, provided that the above
8+
# copyright notice and this permission notice appear in all copies.
9+
#
10+
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11+
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12+
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13+
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14+
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15+
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16+
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17+
#
18+
19+
from datetime import date
20+
import warnings
21+
22+
import conftest
23+
24+
25+
def test_show_plots_cutoff_notice():
26+
"""Emit a visible reminder after the cutoff date without failing tests."""
27+
if date.today() <= conftest.SHOW_PLOTS_REMOVAL_DATE:
28+
return
29+
30+
warnings.warn(
31+
"The cutoff date for '--show_plots' has passed. Please remove the deprecated show_plots pytest option/fixture usage.",
32+
UserWarning,
33+
stacklevel=1,
34+
)

0 commit comments

Comments
 (0)