Show More
@@ -62,16 +62,8 b' def teardown_environment():' | |||
|
62 | 62 | |
|
63 | 63 | with_enivronment = with_setup(setup_environment, teardown_environment) |
|
64 | 64 | |
|
65 | ||
|
66 | ||
|
67 | ||
|
68 | 65 | @with_enivronment |
|
69 | 66 | def test_get_home_dir_1(): |
|
70 | """Testcase to see if we can call get_home_dir without Exceptions.""" | |
|
71 | home_dir = genutils.get_home_dir() | |
|
72 | ||
|
73 | @with_enivronment | |
|
74 | def test_get_home_dir_2(): | |
|
75 | 67 | """Testcase for py2exe logic, un-compressed lib |
|
76 | 68 | """ |
|
77 | 69 | sys.frozen = True |
@@ -83,7 +75,7 b' def test_get_home_dir_2():' | |||
|
83 | 75 | assert home_dir == abspath(join(test_file_path, "home_test_dir")) |
|
84 | 76 | |
|
85 | 77 | @with_enivronment |
|
86 |
def test_get_home_dir_ |
|
|
78 | def test_get_home_dir_2(): | |
|
87 | 79 | """Testcase for py2exe logic, compressed lib |
|
88 | 80 | """ |
|
89 | 81 | sys.frozen=True |
@@ -94,14 +86,14 b' def test_get_home_dir_3():' | |||
|
94 | 86 | assert home_dir == abspath(join(test_file_path, "home_test_dir")).lower() |
|
95 | 87 | |
|
96 | 88 | @with_enivronment |
|
97 |
def test_get_home_dir_ |
|
|
89 | def test_get_home_dir_3(): | |
|
98 | 90 | """Testcase $HOME is set, then use its value as home directory.""" |
|
99 | 91 | env["HOME"] = join(test_file_path,"home_test_dir") |
|
100 | 92 | home_dir = genutils.get_home_dir() |
|
101 | 93 | assert home_dir == env["HOME"] |
|
102 | 94 | |
|
103 | 95 | @with_enivronment |
|
104 |
def test_get_home_dir_ |
|
|
96 | def test_get_home_dir_4(): | |
|
105 | 97 | """Testcase $HOME is not set, os=='posix'. |
|
106 | 98 | This should fail with HomeDirError""" |
|
107 | 99 | |
@@ -114,7 +106,7 b' def test_get_home_dir_5():' | |||
|
114 | 106 | pass |
|
115 | 107 | |
|
116 | 108 | @with_enivronment |
|
117 |
def test_get_home_dir_ |
|
|
109 | def test_get_home_dir_5(): | |
|
118 | 110 | """Testcase $HOME is not set, os=='nt' |
|
119 | 111 | env['HOMEDRIVE'],env['HOMEPATH'] points to path.""" |
|
120 | 112 | |
@@ -126,7 +118,7 b' def test_get_home_dir_6():' | |||
|
126 | 118 | assert home_dir == abspath(join(test_file_path, "home_test_dir")) |
|
127 | 119 | |
|
128 | 120 | @with_enivronment |
|
129 |
def test_get_home_dir_ |
|
|
121 | def test_get_home_dir_6(): | |
|
130 | 122 | """Testcase $HOME is not set, os=='nt' |
|
131 | 123 | env['HOMEDRIVE'],env['HOMEPATH'] do not point to path. |
|
132 | 124 | env['USERPROFILE'] points to path |
@@ -143,7 +135,7 b' def test_get_home_dir_8():' | |||
|
143 | 135 | # Should we stub wreg fully so we can run the test on all platforms? |
|
144 | 136 | #@skip_if_not_win32 |
|
145 | 137 | @with_enivronment |
|
146 |
def test_get_home_dir_ |
|
|
138 | def test_get_home_dir_7(): | |
|
147 | 139 | """Testcase $HOME is not set, os=='nt' |
|
148 | 140 | env['HOMEDRIVE'],env['HOMEPATH'], env['USERPROFILE'] missing |
|
149 | 141 | """ |
@@ -172,12 +164,6 b' def test_get_home_dir_9():' | |||
|
172 | 164 | |
|
173 | 165 | @with_enivronment |
|
174 | 166 | def test_get_ipython_dir_1(): |
|
175 | """1 Testcase to see if we can call get_ipython_dir without Exceptions.""" | |
|
176 | ipdir = genutils.get_ipython_dir() | |
|
177 | ||
|
178 | ||
|
179 | @with_enivronment | |
|
180 | def test_get_ipython_dir_2(): | |
|
181 | 167 | """2 Testcase to see if we can call get_ipython_dir without Exceptions.""" |
|
182 | 168 | env['IPYTHONDIR'] = "someplace/.ipython" |
|
183 | 169 | ipdir = genutils.get_ipython_dir() |
@@ -185,7 +171,7 b' def test_get_ipython_dir_2():' | |||
|
185 | 171 | |
|
186 | 172 | |
|
187 | 173 | @with_enivronment |
|
188 |
def test_get_ipython_dir_ |
|
|
174 | def test_get_ipython_dir_2(): | |
|
189 | 175 | """3 Testcase to see if we can call get_ipython_dir without Exceptions.""" |
|
190 | 176 | genutils.get_home_dir=lambda : "someplace" |
|
191 | 177 | os.name = "posix" |
@@ -193,7 +179,7 b' def test_get_ipython_dir_3():' | |||
|
193 | 179 | assert ipdir == os.path.abspath(os.path.join("someplace", ".ipython")) |
|
194 | 180 | |
|
195 | 181 | @with_enivronment |
|
196 |
def test_get_ipython_dir_ |
|
|
182 | def test_get_ipython_dir_3(): | |
|
197 | 183 | """4 Testcase to see if we can call get_ipython_dir without Exceptions.""" |
|
198 | 184 | genutils.get_home_dir = lambda : "someplace" |
|
199 | 185 | os.name = "nt" |
General Comments 0
You need to be logged in to leave comments.
Login now