Rev4070, Fix Multiuser plugin import order, Run coverage before optional plugins

This commit is contained in:
shortcutme 2019-04-15 22:54:17 +02:00
parent 8246505289
commit 5ff2f792e6
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
3 changed files with 8 additions and 3 deletions

View File

@ -33,9 +33,9 @@ script:
- python -m pytest -x plugins/Bigfile/Test - python -m pytest -x plugins/Bigfile/Test
- python -m pytest -x plugins/AnnounceLocal/Test - python -m pytest -x plugins/AnnounceLocal/Test
- python -m pytest -x plugins/OptionalManager/Test - python -m pytest -x plugins/OptionalManager/Test
- python -m pytest src/Test --cov=src --cov-config src/Test/coverage.ini
- mv plugins/disabled-Multiuser plugins/Multiuser && python -m pytest -x plugins/Multiuser/Test - mv plugins/disabled-Multiuser plugins/Multiuser && python -m pytest -x plugins/Multiuser/Test
- mv plugins/disabled-Bootstrapper plugins/Bootstrapper && python -m pytest -x plugins/Bootstrapper/Test - mv plugins/disabled-Bootstrapper plugins/Bootstrapper && python -m pytest -x plugins/Bootstrapper/Test
- python -m pytest src/Test --cov=src --cov-config src/Test/coverage.ini
before_install: before_install:
- pip install -U pytest mock pytest-cov selenium - pip install -U pytest mock pytest-cov selenium
- pip install codecov - pip install codecov

View File

@ -5,9 +5,14 @@ import json
from Config import config from Config import config
from Plugin import PluginManager from Plugin import PluginManager
from Crypt import CryptBitcoin from Crypt import CryptBitcoin
from User import UserManager
from . import UserPlugin from . import UserPlugin
# We can only import plugin host clases after the plugins are loaded
@PluginManager.afterLoad
def importPluginnedClasses():
global UserManager
from User import UserManager
try: try:
local_master_addresses = set(json.load(open("%s/users.json" % config.data_dir)).keys()) # Users in users.json local_master_addresses = set(json.load(open("%s/users.json" % config.data_dir)).keys()) # Users in users.json
except Exception as err: except Exception as err:

View File

@ -13,7 +13,7 @@ class Config(object):
def __init__(self, argv): def __init__(self, argv):
self.version = "0.7.0" self.version = "0.7.0"
self.rev = 4069 self.rev = 4070
self.argv = argv self.argv = argv
self.action = None self.action = None
self.pending_changes = {} self.pending_changes = {}