mehmetg
mehmetg

Reputation: 307

py.test fixture scoped 'session' is executing once per module/file. Is there a global single run fixture scoping option available?

Does anyone have any insight on this? I am trying to figure out the differences between 'session' and 'module' scope.

This question has been asked before in different terms, but never really answered.

Thanks.

Upvotes: 0

Views: 1480

Answers (1)

The Compiler
The Compiler

Reputation: 11929

Your title is wrong I'm afraid - session scoped fixtures are exactly what you're asking for (running once per test session), while module scoped fixtures run once per module (i.e. file).

Upvotes: 3

Related Questions