The branch, twofactorauth has been updated via 3c2a7250319323022385859ff821e3a63a88bad7 (commit) from f21814de163d912e7c898753e197189c73f26aa5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: tests/__init__.py | 21 ----------- tests/runalltests.py | 43 ---------------------- tests/test_printing.py | 96 ------------------------------------------------ x2go/inifiles.py | 4 ++ 4 files changed, 4 insertions(+), 160 deletions(-) delete mode 100644 tests/__init__.py delete mode 100644 tests/runalltests.py delete mode 100644 tests/test_printing.py The diff of changes is: diff --git a/tests/__init__.py b/tests/__init__.py deleted file mode 100644 index ec92a8c..0000000 --- a/tests/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright (C) 2010 by Mike Gabriel <mike.gabriel@das-netzwerkteam.de> -# -# Python X2go 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. -# -# Python X2go 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, write to the -# Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -import runalltests -import test_printing diff --git a/tests/runalltests.py b/tests/runalltests.py deleted file mode 100644 index 275d2d8..0000000 --- a/tests/runalltests.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -# Copyright (C) 2010 by Mike Gabriel <mike.gabriel@das-netzwerkteam.de> -# -# Python X2go 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. -# -# Python X2go 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, write to the -# Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -"""\ -This file is a default test runner as found in ZOPE/Plone products. It works -fine for any kind of Python unit testing---as we do here for Python X2go. -""" - -import os, sys -base = '/'.join(os.getcwd().split('/')[:-1]) -sys.path.append(os.path.join(base, 'x2go')) - -import unittest -TestRunner = unittest.TextTestRunner -suite = unittest.TestSuite() - -tests = os.listdir(os.curdir) -tests = [n[:-3] for n in tests if n.startswith('test') and n.endswith('.py')] - -for test in tests: - m = __import__(test) - if hasattr(m, 'test_suite'): - suite.addTest(m.test_suite()) - -if __name__ == '__main__': - TestRunner().run(suite) diff --git a/tests/test_printing.py b/tests/test_printing.py deleted file mode 100644 index 1eb788a..0000000 --- a/tests/test_printing.py +++ /dev/null @@ -1,96 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright (C) 2010 by Mike Gabriel <mike.gabriel@das-netzwerkteam.de> -# -# Python X2go 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. -# -# Python X2go 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, write to the -# Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -import unittest - -# Python X2go modules -import printing - -class TestX2goClientPrinting(unittest.TestCase): - - def test_client_printing_defaults(self): - _printing = """\ -[General] -pdfview=true -[print] -startcmd=false -command=lpr -[view] -open=true -command=xpdf -[CUPS] -defaultprinter=PDF -""" - p_action = printing.X2goClientPrinting(config_files=None, config=_printing) - self.assertEqual(type(p_action.print_action), printing.X2goPrintActionPDFVIEW) - - def test_print_action_pdfsave_defaults(self): - _printing = """\ -[General] -pdfview=true -[print] -startcmd=false -command=lpr -[view] -open=false -command=xpdf -[CUPS] -defaultprinter=PDF -""" - p_action = printing.X2goClientPrinting(config_files=None, config=_printing) - self.assertEqual(type(p_action.print_action), printing.X2goPrintActionPDFSAVE) - - def test_print_action_cups_defaults(self): - _printing = """\ -[General] -pdfview=false -[print] -startcmd=false -command=lpr -[view] -open=false -command=xpdf -[CUPS] -defaultprinter=PDF -""" - p_action = printing.X2goClientPrinting(config_files=None, config=_printing) - self.assertEqual(type(p_action.print_action), printing.X2goPrintActionCUPS) - - def test_print_action_printcmd_defaults(self): - _printing = """\ -[General] -pdfview=false -[print] -startcmd=true -command=lpr -[view] -open=false -command=xpdf -[CUPS] -defaultprinter=PDF -""" - p_action = printing.X2goClientPrinting(config_files=None, config=_printing) - self.assertEqual(type(p_action.print_action), printing.X2goPrintActionPRINTCMD) - - -def test_suite(): - from unittest import TestSuite, makeSuite - suite = TestSuite() - suite.addTest(makeSuite(TestX2goClientPrinting)) - return suite diff --git a/x2go/inifiles.py b/x2go/inifiles.py index e78af61..68ebee4 100644 --- a/x2go/inifiles.py +++ b/x2go/inifiles.py @@ -76,6 +76,10 @@ class X2goIniFile(object): @type loglevel: int """ + # make sure a None type gets turned into list type + if not config_files: + config_files = [] + if logger is None: self.logger = log.X2goLogger(loglevel=loglevel) else: hooks/post-receive -- python-x2go.git (Python X2Go Client API) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "python-x2go.git" (Python X2Go Client API).