call site 15 for magic.autopath
apigen/testing/test_apigen_functional.py - line 130
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
   def test_apigen_functional():
       #if py.std.sys.platform == "win32":
       #    py.test.skip("XXX test fails on windows")
       fs_root, package_name = setup_fs_project('test_apigen_functional')
       tempdir = py.test.ensuretemp('test_apigen_functional_results')
->     pydir = py.magic.autopath().dirpath().dirpath().dirpath()
       pakdir = fs_root.join('pak')
       if py.std.sys.platform == 'win32':
           cmd = ('set APIGENPATH=%s && set PYTHONPATH=%s && '
                  'python "%s/bin/py.test"') % (tempdir, fs_root, pydir)
       else:
           cmd = ('APIGENPATH="%s" PYTHONPATH="%s" '
                  'python "%s/bin/py.test"') % (tempdir, fs_root, pydir)
       try:
           output = py.process.cmdexec('%s --apigen="%s/apigen.py" "%s"' % (
                                           cmd, fs_root, pakdir))
       except py.error.Error, e:
           print e.out
           raise
       assert output.lower().find('traceback') == -1
   
       # just some quick content checks
       apidir = tempdir.join('api')
       assert apidir.check(dir=True)
       sometestclass_api = apidir.join('main.SomeTestClass.html')
       assert sometestclass_api.check(file=True)
       html = sometestclass_api.read()
       print html
       assert '<a href="main.SomeTestClass.html">SomeTestClass</a>' in html
       assert 'someattr: <em>somevalue</em>' in html
       
       namespace_api = apidir.join('main.html')
       assert namespace_api.check(file=True)
       html = namespace_api.read()
       assert '<a href="main.SomeTestClass.html">SomeTestClass</a>' in html
       index = apidir.join('index.html')
       assert index.check(file=True)
       html = index.read()
       assert 'pkg docstring' in html
   
       sourcedir = tempdir.join('source')
       assert sourcedir.check(dir=True)
       sometestclass_source = sourcedir.join('sometestclass.py.html')
       assert sometestclass_source.check(file=True)
       html = sometestclass_source.read()
       assert '<div class="project_title">sources for sometestclass.py</div>' in html
   
       index = sourcedir.join('index.html')
       assert index.check(file=True)
       html = index.read()
       print html
       assert '<a href="test/index.html">test</a>' in html
       assert 'href="../../py/doc/home.html"'