|
1 | 1 | import unittest |
| 2 | +from os.path import join |
2 | 3 |
|
3 | 4 | from test import support |
4 | 5 | from io import StringIO |
@@ -126,36 +127,36 @@ def test_needs_no_minimizing(self): |
126 | 127 | def test_normal_case(self): |
127 | 128 | self.assertEqual( |
128 | 129 | _build_minimal_path_by_full_path([ |
129 | | - 'foo/bar', |
130 | | - 'baz/bar', |
131 | | - 'apple/orange', |
| 130 | + join('foo', 'bar'), |
| 131 | + join('baz', 'bar'), |
| 132 | + join('apple', 'orange'), |
132 | 133 | ]), |
133 | 134 | { |
134 | | - 'foo/bar': 'foo/bar', |
135 | | - 'baz/bar': 'baz/bar', |
136 | | - 'apple/orange': 'orange', |
| 135 | + join('foo', 'bar'): join('foo', 'bar'), |
| 136 | + join('baz', 'bar'): join('baz', 'bar'), |
| 137 | + join('apple', 'orange'): 'orange', |
137 | 138 | } |
138 | 139 | ) |
139 | 140 |
|
140 | 141 | def test_intermediate(self): |
141 | 142 | self.assertEqual( |
142 | 143 | _build_minimal_path_by_full_path([ |
143 | | - 'apple/mango/orange/grape/melon', |
144 | | - 'apple/mango/lemon/grape/melon', |
| 144 | + join('apple', 'mango', 'orange', 'grape', 'melon'), |
| 145 | + join('apple', 'mango', 'lemon', 'grape', 'melon'), |
145 | 146 | ]), |
146 | 147 | { |
147 | | - 'apple/mango/orange/grape/melon': 'orange/grape/melon', |
148 | | - 'apple/mango/lemon/grape/melon': 'lemon/grape/melon', |
| 148 | + join('apple', 'mango', 'orange', 'grape', 'melon'): join('orange', 'grape', 'melon'), |
| 149 | + join('apple', 'mango', 'lemon', 'grape', 'melon'): join('lemon', 'grape', 'melon'), |
149 | 150 | } |
150 | 151 | ) |
151 | 152 |
|
152 | 153 | def test_dunder_init_special_case(self): |
153 | 154 | self.assertEqual( |
154 | 155 | _build_minimal_path_by_full_path([ |
155 | | - 'apple/mango/orange/grape/__init__.py', |
| 156 | + join('apple', 'mango', 'orange', 'grape', '__init__.py'), |
156 | 157 | ]), |
157 | 158 | { |
158 | | - 'apple/mango/orange/grape/__init__.py': 'grape/__init__.py', |
| 159 | + join('apple', 'mango', 'orange', 'grape', '__init__.py'): join('grape', '__init__.py'), |
159 | 160 | } |
160 | 161 | ) |
161 | 162 |
|
|
0 commit comments