call site 3 for test.skip
apigen/testing/test_apigen_example.py - line 329
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
   def test_get_revision(self):
->     py.test.skip('XXX changed implementation (temporarily?)')
       if py.std.sys.platform.startswith('win'):
           py.test.skip('broken on win32 for some reason (svn caching?), '
                        'skipping')
       # XXX a lot of setup required for this one... more like a functional
       # test I fear
           
       # create test repo and checkout
       repo = make_test_repo('test_get_revision_api_repo')
       wc = py.path.svnwc(py.test.ensuretemp('test_get_revision_api_wc'))
       wc.checkout(repo.url)
       assert wc.status().rev == '0'
   
       # create a temp package inside the working copy
       fs_root, pkg_name = setup_fs_project(wc)
       ds, dsa = get_dsa(self.fs_root, self.pkg_name)
       wc.commit('test get revision commit')
       wc.update()
   
       # clear cache
       py.__.apigen.htmlgen._get_obj_cache = {}
   
       # fiddle about a bit with paths so that our package is picked up :|
       old_path = py.std.sys.path
       try:
           py.std.sys.path.insert(0, fs_root.strpath)
           pkgkeys = [k for k in py.std.sys.modules.keys() if
                      k == 'pkg' or k.startswith('pkg.')]
           # remove modules from sys.modules
           for key in pkgkeys:
               del py.std.sys.modules[key]
   
           # now create a new apb that uses the wc pkg
           apb = ApiPageBuilder(self.base, self.linker, dsa,
                                fs_root.join(pkg_name),
                                self.namespace_tree, self.project)
           apb._revcache = {} # clear cache, this is on class level!!
   
           pkg = wc.join('pkg')
           assert pkg.check(versioned=True)
           assert pkg.info().created_rev == 1
   
           funcpath = pkg.join('func.py')
           classpath = pkg.join('someclass.py')
           assert funcpath.check(versioned=True)
           assert classpath.check(versioned=True)
           assert apb.get_revision('main.sub.func') == 1
           assert apb.get_revision('main.SomeClass') == 1
           assert apb.get_revision('') == 1
           assert apb.get_revision('main.sub') == 1
           funcpath.write(funcpath.read() + '\n')
           funcpath.commit('updated func')
           wc.update()
           apb._revcache = {} # clear cache
           assert apb.get_revision('main.sub.func') == 2
           assert apb.get_revision('') == 1
           assert apb.get_revision('main.SomeClass') == 1
       finally:
           py.std.sys.path = old_path
           # clear caches again
           py.__.apigen.htmlgen._get_obj_cache = {}
           apb._revcache = {}