Skip to content

Commit

Permalink
Merge pull request ZeroNetX#214 from caryoscelus/fix-tests
Browse files Browse the repository at this point in the history
Fix tests
  • Loading branch information
caryoscelus authored Sep 16, 2023
2 parents e7b566a + 51a6eaa commit 9629442
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
11 changes: 3 additions & 8 deletions src/Test/TestThreadPool.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ def testExecutionOrder(self):
@pool.wrap
def blocker():
events.append("S")
out = 0
for i in range(10000000):
if i == 3000000:
events.append("M")
out += 1
time.sleep(0.001)
events.append("M")
time.sleep(0.001)
events.append("D")
return out

Expand All @@ -30,9 +28,6 @@ def blocker():

assert events == ["S"] * 3 + ["M"] * 3 + ["D"] * 3

res = blocker()
assert res == 10000000

def testLockBlockingSameThread(self):
lock = ThreadPool.Lock()

Expand Down
3 changes: 0 additions & 3 deletions src/Test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ def pytest_collection_modifyitems(config, items):

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.parse(parse_config=False) # Parse again to add plugin configuration options

Expand Down
2 changes: 1 addition & 1 deletion src/Test/pytest.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[pytest]
python_files = Test*.py
addopts = -rsxX -v --durations=6 --no-print-logs --capture=fd
addopts = -rsxX -v --durations=6 --capture=fd
markers =
slow: mark a tests as slow.
webtest: mark a test as a webtest.

0 comments on commit 9629442

Please sign in to comment.