Skip to content

Commit 7969307

Browse files
committed
Add more tests
1 parent e166653 commit 7969307

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

gazelle/python/testdata/annotation_include_pytest_conftest/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ Additionally, we test that:
1616
the annotation was not present.
1717
+ last annotation (highest line number) wins.
1818
+ the annotation has no effect on non-test files/targets.
19+
+ the `include_dep` can still inject `:conftest` even when `include_pytest_conftest`
20+
is false.
21+
+ `import conftest` will still add the dep even when `include_pytest_conftest` is
22+
false.
1923

2024
An annotation without a value is not tested, as that's part of the core
2125
annotation framework and not specific to this annotation.

gazelle/python/testdata/annotation_include_pytest_conftest/with_conftest/BUILD.out

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ py_test(
2828
deps = [":conftest"],
2929
)
3030

31+
py_test(
32+
name = "conftest_imported_test",
33+
srcs = ["conftest_imported_test.py"],
34+
deps = [":conftest"],
35+
)
36+
37+
py_test(
38+
name = "conftest_included_test",
39+
srcs = ["conftest_included_test.py"],
40+
deps = [":conftest"],
41+
)
42+
3143
py_test(
3244
name = "false_test",
3345
srcs = ["false_test.py"],
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import conftest
2+
3+
# gazelle:include_pytest_conftest false
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# gazelle:include_dep :conftest
2+
# gazelle:include_pytest_conftest false

0 commit comments

Comments
 (0)