Vadim  Kovrizhkin
Vadim Kovrizhkin

Reputation: 1781

PyVirtualDisplay AttributeError: 'Display' object has no attribute 'old_display_var'

I get

AttributeError: 'Display' object has no attribute 'old_display_var' 

in PyVirtualDisplay when trying to stop display after tests execution:

in setUp method:

self.display = Display(visible=False, size=(1440, 900)) 
self.display.start()

then open browser and execute tests

and in tearDown method:

self.display.stop()

I want to stop display because of many opened Xvfb processes in ubuntu after several test execution

Upvotes: 1

Views: 2129

Answers (1)

Stan van Rooy
Stan van Rooy

Reputation: 346

I got the same message yesterday. I forgot starting the display with self.display.start()

Adding this to the file resolved the issue.

Upvotes: 3

Related Questions