diff options
Diffstat (limited to 'test/tc_ui.py')
-rw-r--r-- | test/tc_ui.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/tc_ui.py b/test/tc_ui.py index 3c659459..fa2bdcac 100644 --- a/test/tc_ui.py +++ b/test/tc_ui.py @@ -13,14 +13,18 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if __name__ == '__main__': from __init__ import init; init() +import os.path +import sys +rangerpath = os.path.join(os.path.dirname(__file__), '..') +if sys.path[1] != rangerpath: + sys.path[1:1] = [rangerpath] import unittest import curses from ranger.gui import ui -from test import Fake, OK, raise_ok +from testlib import Fake, OK, raise_ok ui.curses = Fake() @@ -39,7 +43,7 @@ class Test(unittest.TestCase): def tearDown(self): self.ui.destroy() - + def test_passing(self): # Test whether certain method calls are passed to widgets widget = self.ui.widget |