We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0652304 commit 60469eeCopy full SHA for 60469ee
testing/test_config.py
@@ -665,6 +665,13 @@ class Distribution:
665
class PseudoPlugin:
666
x = 42
667
668
+ attrs_used = []
669
+
670
+ def __getattr__(self, name):
671
+ assert name == "__loader__"
672
+ self.attrs_used.append(name)
673
+ return object()
674
675
def distributions():
676
return (Distribution(),)
677
@@ -674,6 +681,10 @@ def distributions():
681
config = testdir.parseconfig(*parse_args)
682
has_loaded = config.pluginmanager.get_plugin("mytestplugin") is not None
683
assert has_loaded == should_load
684
+ if should_load:
685
+ assert PseudoPlugin.attrs_used == ["__loader__"]
686
+ else:
687
+ assert PseudoPlugin.attrs_used == []
688
678
689
679
690
def test_cmdline_processargs_simple(testdir):
0 commit comments