Eisenhaus335 has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/400905 )
Change subject: Creating daemonize_tests.py
......................................................................
Creating daemonize_tests.py
Change-Id: I33fe6d83014590b701dfdb999fedb1b73a127e69
---
M tests/daemonize_tests.py
1 file changed, 9 insertions(+), 12 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/05/400905/1
diff --git a/tests/daemonize_tests.py b/tests/daemonize_tests.py
index f76e569..dee9435 100644
--- a/tests/daemonize_tests.py
+++ b/tests/daemonize_tests.py
@@ -1,15 +1,15 @@
# -*- coding: utf-8 -*-
"""Tests for BasePage subclasses."""
-#
from __future__ import absolute_import, unicode_literals
-from pywikibot import daemonize
-
import os
+
+from pywikibot import daemonize
def test_daemonize_os_exit():
+ os.fork()
os.fork()
daemonize.daemonize()
daemonize.daemonize()
@@ -37,14 +37,11 @@
def test_daemonize_writepid_True():
os.fork()
- # cannot be tested because spaghetti code
+ #cannot be tested because spaghetti code
-def load_tests(loader, tests, pattern):
- test_daemonize_os_exit()
- test_daemonize_closedstream_true()
- test_daemonize_closedstream_false()
- test_daemonize_changedirectory_true()
- test_daemonize_changeddirectory_false()
- test_daemonize_writepid_True()
- test_redirectstd_true()
+if __name__ == '__main__': # pragma: no cover
+ try:
+ unittest.main()
+ except SystemExit:
+pass
--
To view, visit https://gerrit.wikimedia.org/r/400905
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I33fe6d83014590b701dfdb999fedb1b73a127e69
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Eisenhaus335 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits