commit
9629442c1b
3 changed files with 4 additions and 12 deletions
|
@ -15,11 +15,9 @@ class TestThreadPool:
|
||||||
@pool.wrap
|
@pool.wrap
|
||||||
def blocker():
|
def blocker():
|
||||||
events.append("S")
|
events.append("S")
|
||||||
out = 0
|
time.sleep(0.001)
|
||||||
for i in range(10000000):
|
|
||||||
if i == 3000000:
|
|
||||||
events.append("M")
|
events.append("M")
|
||||||
out += 1
|
time.sleep(0.001)
|
||||||
events.append("D")
|
events.append("D")
|
||||||
return out
|
return out
|
||||||
|
|
||||||
|
@ -30,9 +28,6 @@ class TestThreadPool:
|
||||||
|
|
||||||
assert events == ["S"] * 3 + ["M"] * 3 + ["D"] * 3
|
assert events == ["S"] * 3 + ["M"] * 3 + ["D"] * 3
|
||||||
|
|
||||||
res = blocker()
|
|
||||||
assert res == 10000000
|
|
||||||
|
|
||||||
def testLockBlockingSameThread(self):
|
def testLockBlockingSameThread(self):
|
||||||
lock = ThreadPool.Lock()
|
lock = ThreadPool.Lock()
|
||||||
|
|
||||||
|
|
|
@ -63,9 +63,6 @@ config.debug = True
|
||||||
|
|
||||||
os.chdir(os.path.abspath(os.path.dirname(__file__) + "/../..")) # Set working dir
|
os.chdir(os.path.abspath(os.path.dirname(__file__) + "/../..")) # Set working dir
|
||||||
|
|
||||||
all_loaded = PluginManager.plugin_manager.loadPlugins()
|
|
||||||
assert all_loaded, "Not all plugin loaded successfully"
|
|
||||||
|
|
||||||
config.loadPlugins()
|
config.loadPlugins()
|
||||||
config.parse(parse_config=False) # Parse again to add plugin configuration options
|
config.parse(parse_config=False) # Parse again to add plugin configuration options
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[pytest]
|
[pytest]
|
||||||
python_files = Test*.py
|
python_files = Test*.py
|
||||||
addopts = -rsxX -v --durations=6 --no-print-logs --capture=fd
|
addopts = -rsxX -v --durations=6 --capture=fd
|
||||||
markers =
|
markers =
|
||||||
slow: mark a tests as slow.
|
slow: mark a tests as slow.
|
||||||
webtest: mark a test as a webtest.
|
webtest: mark a test as a webtest.
|
||||||
|
|
Loading…
Reference in a new issue