[gnome-logs/wip/test] Remove non_read_block function



commit 333666c6d7c8ef27b37fe1832457f9a09932e236
Author: Rashi Aswani <aswanirashi19 gmail com>
Date:   Thu Aug 20 20:48:07 2015 +0530

    Remove non_read_block function

 tests/common_steps.py |   11 +----------
 tests/environment.py  |    2 +-
 2 files changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/tests/common_steps.py b/tests/common_steps.py
index d2e943e..9bd283d 100644
--- a/tests/common_steps.py
+++ b/tests/common_steps.py
@@ -10,7 +10,7 @@ from signal import signal, alarm, SIGALRM
 from subprocess import Popen, PIPE
 from behave import step
 from gi.repository import GLib, Gio
-import fcntl, os
+import os
 
 from dogtail.rawinput import keyCombo, absoluteMotion, pressKey
 from dogtail.tree import root
@@ -133,12 +133,3 @@ def cleanup():
     schemas = [x for x in Gio.Settings.list_schemas() if 'gnome-logs-test' in x.lower()]
     for schema in schemas:
         system("gsettings reset-recursively %s" % schema)
-
-def non_block_read(output):
-    fd = output.fileno()
-    fl = fcntl.fcntl(fd, fcntl.F_GETFL)
-    fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NONBLOCK)
-    try:
-        return output.read()
-    except:
-        return ""
diff --git a/tests/environment.py b/tests/environment.py
index e53266d..82c7ee0 100644
--- a/tests/environment.py
+++ b/tests/environment.py
@@ -5,7 +5,7 @@ from dogtail.utils import isA11yEnabled, enableA11y
 if not isA11yEnabled():
     enableA11y(True)
 
-from common_steps import App, dummy, cleanup, non_block_read
+from common_steps import App, dummy, cleanup
 from dogtail.config import config
 import os
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]