(self)
| 181 | self.run_code(s) |
| 182 | |
| 183 | def test_5(self): |
| 184 | hier = [ |
| 185 | ("t5", None), |
| 186 | ("t5 __init__.py", "import t5.foo"), |
| 187 | ("t5 string.py", "spam = 1"), |
| 188 | ("t5 foo.py", |
| 189 | "from . import string; assert string.spam == 1"), |
| 190 | ] |
| 191 | self.mkhier(hier) |
| 192 | |
| 193 | import t5 |
| 194 | s = """ |
| 195 | from t5 import * |
| 196 | self.assertEqual(dir(), ['foo', 'self', 'string', 't5']) |
| 197 | """ |
| 198 | self.run_code(s) |
| 199 | |
| 200 | import t5 |
| 201 | self.assertEqual(fixdir(dir(t5)), |
| 202 | ['__cached__', '__doc__', '__file__', '__loader__', |
| 203 | '__name__', '__package__', '__path__', '__spec__', |
| 204 | 'foo', 'string', 't5']) |
| 205 | self.assertEqual(fixdir(dir(t5.foo)), |
| 206 | ['__cached__', '__doc__', '__file__', '__loader__', |
| 207 | '__name__', '__package__', '__spec__', 'string']) |
| 208 | self.assertEqual(fixdir(dir(t5.string)), |
| 209 | ['__cached__', '__doc__', '__file__', '__loader__', |
| 210 | '__name__', '__package__', '__spec__', 'spam']) |
| 211 | |
| 212 | def test_6(self): |
| 213 | hier = [ |
nothing calls this directly
no test coverage detected