change to pytest
This commit is contained in:
parent
7aece7937b
commit
c5e56346bf
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -1,4 +1,4 @@
|
||||
lubuntu-breeze-color (0.1) UNRELEASED; urgency=medium
|
||||
lubuntu-breeze-config (0.1dev) UNRELEASED; urgency=medium
|
||||
|
||||
* Initial release. (Closes: #XXXXXX)
|
||||
|
||||
|
15
debian/control
vendored
15
debian/control
vendored
@ -1,4 +1,4 @@
|
||||
Source: lubuntu-breeze-color
|
||||
Source: lubuntu-breeze-config
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Maintainer: Hans P Möller <hmollercl@lubuntu.me>
|
||||
@ -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.
|
||||
|
2
debian/lubuntu-breeze-color.install
vendored
2
debian/lubuntu-breeze-color.install
vendored
@ -1,2 +0,0 @@
|
||||
data/breeze-color.desktop /usr/share/applications/breeze-color.desktop
|
||||
data/designer /usr/share/lubuntu-breeze-color/designer
|
2
debian/lubuntu-breeze-config.install
vendored
Normal file
2
debian/lubuntu-breeze-config.install
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
# data/breeze-color.desktop /usr/share/applications/breeze-color.desktop
|
||||
# data/designer /usr/share/lubuntu-breeze-color/designer
|
4
debian/rules
vendored
4
debian/rules
vendored
@ -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
|
||||
|
4
debian/tests/run-tests
vendored
4
debian/tests/run-tests
vendored
@ -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
|
||||
|
@ -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/"
|
||||
|
7
setup.py
7
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",
|
||||
|
@ -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 = '.'
|
||||
|
||||
|
||||
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 += "<br/>"
|
||||
noteText += _("In case of pcmanfm-qt, since it handles the desktop, ")
|
||||
noteText += _("a restart of the desktop is needed") + "<br/>"
|
||||
noteText += _("Easier, restart session.")
|
||||
noteText += "<br/>"
|
||||
noteText += _("Best results if a matching GTK Theme is selected.")
|
||||
|
||||
self.assertEqual(self.form.label.text(), label)
|
||||
self.assertEqual(self.form.note.text(), '<font size="-1">' + noteText + '</font>')
|
||||
|
||||
def testComoboxPopulation(self):
|
||||
'''test if combobox is populated with same entries as number of files
|
||||
(+1 because on None)'''
|
||||
|
Loading…
x
Reference in New Issue
Block a user