changeset 562:17931e46e2df pytest2

py.test changed to pytest in conftest.py and all the tests of converter module.
author pkumar <contactprashantat@gmail.com>
date Wed, 25 May 2011 19:14:55 +0530
parents a311a1addca3
children a41acf254474
files MoinMoin/conftest.py MoinMoin/converter/_tests/test__args.py MoinMoin/converter/_tests/test__args_wiki.py MoinMoin/converter/_tests/test_creole_in.py MoinMoin/converter/_tests/test_docbook_in.py MoinMoin/converter/_tests/test_docbook_out.py MoinMoin/converter/_tests/test_html_in.py MoinMoin/converter/_tests/test_html_in_out.py MoinMoin/converter/_tests/test_html_out.py MoinMoin/converter/_tests/test_include.py MoinMoin/converter/_tests/test_link.py MoinMoin/converter/_tests/test_mediawiki_in.py MoinMoin/converter/_tests/test_moinwiki19_in.py
diffstat 13 files changed, 26 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/conftest.py	Wed May 25 17:27:12 2011 +0530
+++ b/MoinMoin/conftest.py	Wed May 25 19:14:55 2011 +0530
@@ -29,7 +29,7 @@
 import sys
 import inspect
 
-import py
+import pytest
 
 from MoinMoin.app import create_app_ext, destroy_app, before_wiki, after_wiki
 from MoinMoin._tests import maketestwiki, wikiconfig
@@ -89,7 +89,7 @@
     destroy_app(app)
 
 
-class MoinClassCollector(py.test.collect.Class):
+class MoinClassCollector(pytest.collect.Class):
 
     def setup(self):
         cls = self.obj
@@ -150,7 +150,7 @@
 def pytest_report_header(config):
     return "The tests here are implemented only for pytest-2"
 
-class Module(py.test.collect.Module):
+class Module(pytest.collect.Module):
     Class = MoinClassCollector
 
     def run(self, *args, **kwargs):
--- a/MoinMoin/converter/_tests/test__args.py	Wed May 25 17:27:12 2011 +0530
+++ b/MoinMoin/converter/_tests/test__args.py	Wed May 25 19:14:55 2011 +0530
@@ -6,7 +6,7 @@
 """
 
 
-import py.test
+import pytest
 
 from MoinMoin.converter._args import *
 
@@ -44,8 +44,8 @@
     assert a['keyword'] is None
     assert a['both'] is None
 
-    py.test.raises(IndexError, a.__getitem__, 2)
-    py.test.raises(KeyError, a.__getitem__, 'none')
+    pytest.raises(IndexError, a.__getitem__, 2)
+    pytest.raises(KeyError, a.__getitem__, 'none')
 
 def test_Arguments___len__():
     positional = ['positional', 'both']
--- a/MoinMoin/converter/_tests/test__args_wiki.py	Wed May 25 17:27:12 2011 +0530
+++ b/MoinMoin/converter/_tests/test__args_wiki.py	Wed May 25 19:14:55 2011 +0530
@@ -6,7 +6,7 @@
 """
 
 
-import py.test
+import pytest
 
 from MoinMoin.converter._args_wiki import *
 
--- a/MoinMoin/converter/_tests/test_creole_in.py	Wed May 25 17:27:12 2011 +0530
+++ b/MoinMoin/converter/_tests/test_creole_in.py	Wed May 25 19:14:55 2011 +0530
@@ -6,7 +6,7 @@
 """
 
 
-import py.test
+import pytest
 
 import re
 
--- a/MoinMoin/converter/_tests/test_docbook_in.py	Wed May 25 17:27:12 2011 +0530
+++ b/MoinMoin/converter/_tests/test_docbook_in.py	Wed May 25 19:14:55 2011 +0530
@@ -10,11 +10,11 @@
 import re
 import StringIO
 
-import py.test
+import pytest
 try:
     from lxml import etree
 except:
-    py.test.skip("lxml module required to run test for docbook_in converter.")
+    pytest.skip("lxml module required to run test for docbook_in converter.")
 
 from emeraldtree.tree import *
 
--- a/MoinMoin/converter/_tests/test_docbook_out.py	Wed May 25 17:27:12 2011 +0530
+++ b/MoinMoin/converter/_tests/test_docbook_out.py	Wed May 25 19:14:55 2011 +0530
@@ -9,11 +9,11 @@
 import re
 import StringIO
 
-import py.test
+import pytest
 try:
     from lxml import etree
 except:
-    py.test.skip("lxml module required to run test for docbook_out converter.")
+    pytest.skip("lxml module required to run test for docbook_out converter.")
 
 from emeraldtree.tree import *
 
--- a/MoinMoin/converter/_tests/test_html_in.py	Wed May 25 17:27:12 2011 +0530
+++ b/MoinMoin/converter/_tests/test_html_in.py	Wed May 25 19:14:55 2011 +0530
@@ -9,11 +9,11 @@
 import re
 import StringIO
 
-import py.test
+import pytest
 try:
     from lxml import etree
 except:
-    py.test.skip("lxml module required to run test for html_in converter.")
+    pytest.skip("lxml module required to run test for html_in converter.")
 
 from emeraldtree.tree import *
 
--- a/MoinMoin/converter/_tests/test_html_in_out.py	Wed May 25 17:27:12 2011 +0530
+++ b/MoinMoin/converter/_tests/test_html_in_out.py	Wed May 25 19:14:55 2011 +0530
@@ -12,11 +12,11 @@
 import StringIO
 import re
 
-import py.test
+import pytest
 try:
     from lxml import etree
 except:
-    py.test.skip("lxml module required to run test for html_in_out converter.")
+    pytest.skip("lxml module required to run test for html_in_out converter.")
 
 from MoinMoin import log
 logging = log.getLogger(__name__)
--- a/MoinMoin/converter/_tests/test_html_out.py	Wed May 25 17:27:12 2011 +0530
+++ b/MoinMoin/converter/_tests/test_html_out.py	Wed May 25 19:14:55 2011 +0530
@@ -10,11 +10,11 @@
 import re
 import StringIO
 
-import py.test
+import pytest
 try:
     from lxml import etree
 except:
-    py.test.skip("lxml module required to run test for html_out converter.")
+    pytest.skip("lxml module required to run test for html_out converter.")
 
 from emeraldtree.tree import *
 
@@ -247,7 +247,7 @@
         for i in data:
             yield (self.do, ) + i
 
-    @py.test.mark.xfail
+    @pytest.mark.xfail
     def test_unknown(self):
         page = ET.XML("<page:unknown %s/>" % self.input_namespaces)
-        py.test.raises(ElementException, self.conv.__call__, page)
+        pytest.raises(ElementException, self.conv.__call__, page)
--- a/MoinMoin/converter/_tests/test_include.py	Wed May 25 17:27:12 2011 +0530
+++ b/MoinMoin/converter/_tests/test_include.py	Wed May 25 19:14:55 2011 +0530
@@ -6,7 +6,7 @@
 """
 
 
-import py.test
+import pytest
 
 from MoinMoin.converter.include import *
 
--- a/MoinMoin/converter/_tests/test_link.py	Wed May 25 17:27:12 2011 +0530
+++ b/MoinMoin/converter/_tests/test_link.py	Wed May 25 19:14:55 2011 +0530
@@ -6,7 +6,7 @@
 """
 
 
-import py.test
+import pytest
 
 from emeraldtree import tree as ET
 
@@ -66,14 +66,14 @@
 
     def _do_wiki(self, input, output, skip=None):
         if skip:
-            py.test.skip(skip)
+            pytest.skip(skip)
         elem = ET.Element(None)
         self.conv.handle_wiki_links(elem, Iri(input))
         assert elem.get(xlink.href) == output
 
     def _do_wikilocal(self, input, page, output, skip=None):
         if skip:
-            py.test.skip(skip)
+            pytest.skip(skip)
         elem = ET.Element(None)
         self.conv.handle_wikilocal_links(elem, Iri(input), Iri(page))
         assert elem.get(xlink.href) == output
--- a/MoinMoin/converter/_tests/test_mediawiki_in.py	Wed May 25 17:27:12 2011 +0530
+++ b/MoinMoin/converter/_tests/test_mediawiki_in.py	Wed May 25 19:14:55 2011 +0530
@@ -7,7 +7,7 @@
 """
 
 
-import py.test
+import pytest
 import re
 
 from MoinMoin.converter.mediawiki_in import *
--- a/MoinMoin/converter/_tests/test_moinwiki19_in.py	Wed May 25 17:27:12 2011 +0530
+++ b/MoinMoin/converter/_tests/test_moinwiki19_in.py	Wed May 25 19:14:55 2011 +0530
@@ -6,7 +6,7 @@
 """
 
 
-import py.test
+import pytest
 
 from MoinMoin.converter.moinwiki19_in import ConverterFormat19