Eisenhaus335 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400406 )

Change subject: 
......................................................................

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Your branch is up-to-date with 'origin/master'.
#
# Changes to be committed:
#       new file:   tests/daemonize_tests.py
#

Change-Id: Ic1ab56984fc8e26d85cbc3779985e11672286387
---
A tests/daemonize_tests.py
1 file changed, 30 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/06/400406/1

diff --git a/tests/daemonize_tests.py b/tests/daemonize_tests.py
new file mode 100644
index 0000000..da2cd9d
--- /dev/null
+++ b/tests/daemonize_tests.py
@@ -0,0 +1,30 @@
+import pywikibot
+from pywikibot import daemonize
+import os
+
+class TestCase1:
+   def test_daemonize_os_exit():
+      os.fork()
+      daemonize.daemonize()
+   def test_daemonize_closedstream_true():
+      daemonize.daemonize(True, True, False, None)
+
+   def test_daemonize_closedstream_false():
+      daemonize.daemonize(False, True, False, None)
+
+   def test_daemonize_changedirectory_true():
+      daemonize.daemonize(True, True, False, None)
+
+   def test_daemonize_changeddirectory_false():
+      daemonize.daemonize(True, False, False, None)
+
+   def test_daemonize_writepid_True():
+      os.fork()
+
+def load_tests(loader, tests, pattern):
+   TestCase1.test_daemonize_os_exit()
+   TestCase1.test_daemonize_closedstream_true()
+   TestCase1.test_daemonize_closedstream_false()
+   TestCase1.test_daemonize_changedirectory_true()
+   TestCase1.test_daemonize_changeddirectory_false()
+TestCase1.test_daemonize_writepid_True()

-- 
To view, visit https://gerrit.wikimedia.org/r/400406
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1ab56984fc8e26d85cbc3779985e11672286387
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

Reply via email to