class FunctionalTests(TestCase):
+ def __init__(self, *args, **kwargs):
+ super(FunctionalTests, self).__init__(*args, **kwargs)
+ self.__itchio_updated = False
+
def __clean(self):
paths = [
'tests/functional',
def test_code(self):
info('test_code')
+ if environ.get('FUNCTIONALPOST') == '1':
+ self.skipTest('skipped functional-post test: test_code')
self.__test_template(
'/home/flavio/venv/bin/python main.py --functional-test',
['/home/flavio/venv/bin/python -m tests.functional_test.py 1',
def test_appimage(self):
info('test_appimage')
+ if environ.get('FUNCTIONALPOST') == '1':
+ self.skipTest('skipped functional-post test: test_appimage')
bld_branch = {'master': 'alpha', 'rc': 'rc', 'stable': 'stable'}[_branch()]
bld_branch = '' if bld_branch == 'stable' else ('-' + bld_branch)
self.__test_template(
# str(Path.home()) + '/.var/app/it.ya2.Pmachines/data/pmachines/tests/functional/')
def __update_itchio(self):
+ info('update_itchio::itchio_updated::cond: %s' % str(self.__itchio_updated))
+ if self.__itchio_updated:
+ return
system('/home/flavio/.itch/itch')
sleep(120)
system('xdotool mousemove 860 620')
system('xdotool click 1')
sleep(300)
system('killall itch')
+ self.__itchio_updated = True
+ info('update_itchio::itchio_updated::done: %s' % str(self.__itchio_updated))
def test_itchio(self):
info('test_itchio')
def test_windows(self):
info('test_windows')
+ if environ.get('FUNCTIONALPOST') == '1':
+ self.skipTest('skipped functional-post test: test_windows')
system('pkill -f "pmachines.exe"')
abspath = str(Path(__file__).parent.parent) + '/build/win_amd64/pmachines.exe'
self.__test_template(