From 649a69cb87af38f4bf1848085d49d1193f6e01ab Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 11 Dec 2009 23:39:45 +0100 Subject: clean ups --- test/__init__.py | 3 +++ test/tc_directory.py | 5 +---- test/tc_history.py | 5 +---- 3 files changed, 5 insertions(+), 8 deletions(-) (limited to 'test') diff --git a/test/__init__.py b/test/__init__.py index 4f1c736a..500d3383 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -3,3 +3,6 @@ import os, sys __all__ = [ x[0:x.index('.')] \ for x in os.listdir(os.path.dirname(__file__)) \ if x.startswith('tc_') ] + +def init(): + sys.path.append(os.path.abspath(os.path.join(sys.path[0], '..'))) diff --git a/test/tc_directory.py b/test/tc_directory.py index 434d282f..cb8e747e 100644 --- a/test/tc_directory.py +++ b/test/tc_directory.py @@ -1,7 +1,4 @@ -if __name__ == '__main__': - from os.path import abspath, join - import sys - sys.path.append(abspath(join(sys.path[0], '..'))) +if __name__ == '__main__': from __init__ import init; init() from ranger import fsobject from ranger.fsobject.file import File diff --git a/test/tc_history.py b/test/tc_history.py index e78af0aa..ad340992 100644 --- a/test/tc_history.py +++ b/test/tc_history.py @@ -1,7 +1,4 @@ -if __name__ == '__main__': - from os.path import abspath, join - import sys - sys.path.append(abspath(join(sys.path[0], '..'))) +if __name__ == '__main__': from __init__ import init; init() from ranger.container import History from unittest import TestCase, main -- cgit 1.4.1-2-gfad0 f/post_test.go?h=v0.3.1&id=3c5dd59f5c3be00909df4a509eea940393fd060e'>diff stats
path: root/post_test.go
blob: 9d04c9eee74ffeceb41e0ad906b2ae272d01883e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75