Commits

Georg Brandl committed c7071b8

Adapt test to new warning API.

Comments (0)

Files changed (1)

tests/test_env.py

 
 def warning_emitted(file, text):
     for warning in warnings:
-        if len(warning) == 2 and file+':' in warning[1] and text in warning[0]:
+        if len(warning) == 2 and file in warning[1] and text in warning[0]:
             return True
     return False
 
     assert 'subdir/excluded' not in env.found_docs
 
 def test_images():
-    assert warning_emitted('images.txt', 'image file not readable: foo.png')
-    assert warning_emitted('images.txt', 'nonlocal image URI found: '
+    assert warning_emitted('images', 'image file not readable: foo.png')
+    assert warning_emitted('images', 'nonlocal image URI found: '
                            'http://www.python.org/logo.png')
 
     tree = env.get_doctree('images')