PY-47941 Add a test on completion of pytest.mark

The problem itself was fixed together with PY-48219 by switching to types to
find possible attributes of a module/package.

GitOrigin-RevId: 587b1c96610375836417655f0feb74f38edb4c69
This commit is contained in:
Mikhail Golubev
2021-08-23 10:14:16 +00:00
committed by intellij-monorepo-bot
parent 6726f799ad
commit d1066811a7
5 changed files with 12 additions and 0 deletions
@@ -0,0 +1,2 @@
MARK_GEN = ...
param = ...
@@ -0,0 +1,3 @@
@pytest.<caret>
def test():
pass
@@ -0,0 +1,2 @@
from _pytest.mark import MARK_GEN as mark
from _pytest.mark import param
@@ -161,6 +161,11 @@ public class PyNotImportedQualifiedNameCompletionTest extends PyTestCase {
assertContainsElements(doBasicCompletion(), "nspkg.submod", "nspkg.subpkg");
}
// PY-47941
public void testAttributeReExportedWithAlias() {
assertContainsElements(doBasicCompletion(), "pytest.mark", "pytest.param");
}
@Nullable
private List<String> doBasicCompletion() {
myFixture.copyDirectoryToProject(getTestName(false), "");