def test_environment_display(self): """ test for detection wrong environment DISPLAY variable """ display = os.environ.get("DISPLAY", None) if display: os.environ["DISPLAY"] = "" with pytest.raises(SystemExit): run_gui() if display: os.environ["DISPLAY"] = display
def test_environment_display(self): """ test for detection wrong environment DISPLAY variable """ display = os.environ.get('DISPLAY', None) if display: os.environ['DISPLAY'] = "" with pytest.raises(SystemExit): run_gui() if display: os.environ['DISPLAY'] = display
#!/usr/bin/env python3 # # -*- coding: utf-8 -*- # # da-gui.py - this program calls mainWindow to start the GUI # Copyright 2013 - 2015 Devassistant contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>. # # Authors: # Petr Hracek <*****@*****.**> from devassistant.gui import run_gui run_gui()