diff options
| author | Georg Brandl <georg@python.org> | 2014-09-21 17:34:16 +0200 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2014-09-21 17:34:16 +0200 |
| commit | a73ab32bc5293f20765eb2f306aef8e5d5bd39ec (patch) | |
| tree | 01869b38066af425536a33765895dcd5380b9dbc /tests/test_ext_viewcode.py | |
| parent | 78af37370c1165293450071453a3cd8860df538f (diff) | |
| download | sphinx-git-a73ab32bc5293f20765eb2f306aef8e5d5bd39ec.tar.gz | |
Split viewcode and linkcode tests out of main test root.
Diffstat (limited to 'tests/test_ext_viewcode.py')
| -rw-r--r-- | tests/test_ext_viewcode.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/test_ext_viewcode.py b/tests/test_ext_viewcode.py index 561fcb6a3..fb24f765a 100644 --- a/tests/test_ext_viewcode.py +++ b/tests/test_ext_viewcode.py @@ -15,7 +15,7 @@ from util import with_app @with_app(testroot='ext-viewcode') -def test_simple(app, status, warning): +def test_viewcode(app, status, warning): app.builder.build_all() warnings = re.sub(r'\\+', '/', warning.getvalue()) @@ -30,3 +30,15 @@ def test_simple(app, status, warning): assert result.count('href="_modules/spam/mod2.html#func2"') == 2 assert result.count('href="_modules/spam/mod1.html#Class1"') == 2 assert result.count('href="_modules/spam/mod2.html#Class2"') == 2 + + +@with_app(testroot='ext-viewcode', tags=['test_linkcode']) +def test_linkcode(app, status, warning): + app.builder.build(['objects']) + + stuff = (app.outdir / 'objects.html').text(encoding='utf-8') + + assert 'http://foobar/source/foolib.py' in stuff + assert 'http://foobar/js/' in stuff + assert 'http://foobar/c/' in stuff + assert 'http://foobar/cpp/' in stuff |
