File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed
Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ # TIMEBOMB: FEWTURE-BOOM1
2+ # FEWTURE-DO-NOT-REPORT: do not report, it's not within an annotation
Original file line number Diff line number Diff line change 1+ # TIMEBOMB: FEWTURE-BOOM2
Original file line number Diff line number Diff line change 33
44from check_oldies import annotations
55
6+ from . import base
7+
68
79FAKE_GIT_BLAME_OUTPUT = """c106813f91ff43b8fc6e231c263bdaa344866157 136 136 1
810some value
@@ -65,3 +67,26 @@ def test_get_login_from_committer_email():
6567 assert login == "<@example.com>" # should not be the empty string
6668 login = annotations .get_login_from_committer_email ("John Smith" )
6769 assert login == "John Smith"
70+
71+
72+
73+ class TestGetKnownFutureTag :
74+ test_data_path = base .TEST_DIR_PATH / "data/project7"
75+
76+ def test_basics (self ):
77+ tags = annotations .get_known_future_tags (
78+ directory = self .test_data_path ,
79+ annotation_regex = base .TESTING_ANNOTATIONS [0 ],
80+ future_tag_regex = base .TESTING_FUTURE_TAG ,
81+ whitelist = (),
82+ )
83+ assert tags == {"FEWTURE-BOOM1" , "FEWTURE-BOOM2" }
84+
85+ def test_whitelist (self ):
86+ tags = annotations .get_known_future_tags (
87+ directory = self .test_data_path ,
88+ annotation_regex = base .TESTING_ANNOTATIONS [0 ],
89+ future_tag_regex = base .TESTING_FUTURE_TAG ,
90+ whitelist = ["file2.py" ],
91+ )
92+ assert tags == {"FEWTURE-BOOM1" }
You can’t perform that action at this time.
0 commit comments