diff --git a/debian/changelog b/debian/changelog index 232909e..2721800 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -lubuntu-breeze-color (0.1) UNRELEASED; urgency=medium +lubuntu-breeze-config (0.1dev) UNRELEASED; urgency=medium * Initial release. (Closes: #XXXXXX) diff --git a/debian/control b/debian/control index 92acac5..900bc0a 100644 --- a/debian/control +++ b/debian/control @@ -1,4 +1,4 @@ -Source: lubuntu-breeze-color +Source: lubuntu-breeze-config Section: utils Priority: optional Maintainer: Hans P Möller @@ -9,12 +9,15 @@ Build-Depends: debhelper-compat (= 12), xvfb Standards-Version: 4.5.0 Rules-Requires-Root: no +Testsuite: autopkgtest-pkg-python -Package: lubuntu-breeze-color +Package: lubuntu-breeze-config Architecture: all Depends: python3, python3-pyqt5, ${misc:Depends}, ${python3:Depends} Description: Breeze Theme Color Scheme Selector - It lets you pick a color scheme from "/usr/share/color-schemes/" and copy it - to "~/.config/kdeglobals" so system use it. Applications need restart in order - to use it. Take into consideration that some file managers also manage the - desktop so you need to restart that too. + It lets you pick a color scheme and change the transparency of the menus. + Color schemes are obtained from "/usr/share/color-schemes/" and when selected + copy to "~/.config/kdeglobals". For transparency of menu the settings are in + "~/.config/breezerc", a composition software is needed to take effect. + Applications need restart in order to apply changes. Take into consideration + that some file managers also manage the desktop so you need to restart that too. diff --git a/debian/lubuntu-breeze-color.install b/debian/lubuntu-breeze-color.install deleted file mode 100644 index 9e25e95..0000000 --- a/debian/lubuntu-breeze-color.install +++ /dev/null @@ -1,2 +0,0 @@ -data/breeze-color.desktop /usr/share/applications/breeze-color.desktop -data/designer /usr/share/lubuntu-breeze-color/designer diff --git a/debian/lubuntu-breeze-config.install b/debian/lubuntu-breeze-config.install new file mode 100644 index 0000000..7b27f80 --- /dev/null +++ b/debian/lubuntu-breeze-config.install @@ -0,0 +1,2 @@ +# data/breeze-color.desktop /usr/share/applications/breeze-color.desktop +# data/designer /usr/share/lubuntu-breeze-color/designer diff --git a/debian/rules b/debian/rules index adbbc80..56328d1 100755 --- a/debian/rules +++ b/debian/rules @@ -1,10 +1,10 @@ #! /usr/bin/make -f export DH_VERBOSE=1 export PYBUILD_INTERPRETERS=python3 -export PYBUILD_NAME=lubuntu-breeze-color +export PYBUILD_NAME=lubuntu-breeze-config %: dh $@ --with python3 --buildsystem=pybuild override_dh_auto_test: - xvfb-run dh_auto_test + xvfb-run dh_auto_test -- --test-pytest diff --git a/debian/tests/run-tests b/debian/tests/run-tests index 9ba9a5c..cbe6041 100644 --- a/debian/tests/run-tests +++ b/debian/tests/run-tests @@ -1,4 +1,4 @@ #!/bin/sh -xvfb-run -python3 setup.py test +# xvfb-run python3 setup.py test +xvfb-run python3 test/test_gui.py diff --git a/lubuntubreeze/breezeconfig.py b/lubuntubreeze/breezeconfig.py index ef2659c..9e0e165 100755 --- a/lubuntubreeze/breezeconfig.py +++ b/lubuntubreeze/breezeconfig.py @@ -35,7 +35,8 @@ class MainWindow(QWidget): self.datadir = options.datadir self.bindir = options.bindir else: - self.datadir = '/usr/share/lubuntu-breeze-config/designer' + self.datadir = '/usr/share/lubuntu-breeze-config' + self.bindir = '/bin' uic.loadUi("%s/designer/main.ui" % self.datadir, self) self.confFile = Path(Path.home() / ".config/kdeglobals") self.schemeDir = "/usr/share/color-schemes/" diff --git a/setup.py b/setup.py index 794520f..3d90596 100644 --- a/setup.py +++ b/setup.py @@ -20,11 +20,10 @@ from setuptools import setup setup( name="lubuntu-breeze-config", - version="0.1dev", - packages=['lubuntu-breeze-config'], + version="0.1.dev0", + packages=['lubuntubreeze'], scripts=['breeze-config'], - data_files=[('libexec/lubuntu-breeze-config/', ['lubuntuBreeze.py']), - ('share/applications/', ['data/breeze-config.desktop']), + data_files=[('share/applications/', ['data/breeze-config.desktop']), ('share/lubuntu-breeze-config/designer/', ['data/designer/main.ui'])], test_suite="tests", diff --git a/tests/test_gui.py b/tests/test_gui.py index a28ca93..3cc89b5 100755 --- a/tests/test_gui.py +++ b/tests/test_gui.py @@ -3,45 +3,36 @@ import unittest import sys +import os from PyQt5.QtWidgets import QApplication from PyQt5.QtCore import QDir, QSettings # from PyQt5.QtTest import QTest from pathlib import Path from gettext import gettext as _ # better than in main "_ = gettext.gettext" for testing - -# from lubuntuBreezeConfig import lubuntuBreeze # import lubuntuBreezeConfig # help(lubuntuBreezeConfig) -sys.path.insert(0, "") -import lubuntuBreeze +# sys.path.insert(0, "../") +sys.path.insert(0, "../") +from lubuntubreeze import breezeconfig +app = QApplication(sys.argv) +class ParserHelper(): + def __init__(self): + self.datadir = '../../../data' + self.bindir = '.' -app = QApplication(sys.argv) class LubuntuBreezeTest(unittest.TestCase): def setUp(self): - self.form = lubuntuBreeze.MainWindow() + options = ParserHelper() + self.form = breezeconfig.MainWindow(options) dir = QDir(self.form.schemeDir) self.files = dir.entryList(dir, dir.Files) self.confFile = Path(Path.home() / ".config/kdeglobals") - def testText(self): - '''Test GUI in default state''' - label = _("Select Color Scheme for Breeze Qt Style:") - noteText =_("Applications need to be restarted for changes to take effect.") - noteText += "
" - noteText += _("In case of pcmanfm-qt, since it handles the desktop, ") - noteText += _("a restart of the desktop is needed") + "
" - noteText += _("Easier, restart session.") - noteText += "
" - noteText += _("Best results if a matching GTK Theme is selected.") - - self.assertEqual(self.form.label.text(), label) - self.assertEqual(self.form.note.text(), '' + noteText + '') - def testComoboxPopulation(self): '''test if combobox is populated with same entries as number of files (+1 because on None)''' diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..50ebc4d --- /dev/null +++ b/tox.ini @@ -0,0 +1,10 @@ +# content of: tox.ini , put in same dir as setup.py +[tox] +envlist = py27,py36 + +[testenv] +# install pytest in the virtualenv where commands will be executed +deps = pytest +commands = + # NOTE: you can run any command line tool here - not just tests + pytest