1. Ronny Pfannschmidt
  2. moin-2.0

Commits

Thomas Waldmann  committed baf5584 Merge

merged pytest2 repo

  • Participants
  • Parent commits e5b51d4, 57af514
  • Branches pytest2

Comments (0)

Files changed (13)

File MoinMoin/_tests/test_test_environ.py

View file
  • Ignore whitespace
             new_rev = item.create_revision(1)
             new_rev[NAME] = pagename
             new_rev[CONTENTTYPE] = u'text/plain'
-            #item.commit()
+            item.commit()
 
         itemname = u"OnlyForThisTest"
         assert not storage.has_item(itemname)

File MoinMoin/auth/_tests/test_log.py

View file
  • Ignore whitespace
 from flask import g as flaskg
 import pytest
 
-class TestAuthLog:
+class TestAuthLog(object):
     """ Test: TestAuthLog """
     def test_login(self):
         authlog_obj = AuthLog()

File MoinMoin/conftest.py

View file
  • Ignore whitespace
 from MoinMoin.storage.backends import create_simple_mapping
 from flask import g as flaskg
 
-#In the beginning following variables have no values
+# In the beginning following variables have no values
 prev_app = None
 prev_cls = None
 prev_ctx = None
                     self.app = prev_app
                     self.ctx = prev_ctx
 
-            #Get the values from the function
+            # Get the values from the function
             prev_app, prev_ctx, prev_cls = get_previous(self.app, self.ctx, cls)
 
         else:

File MoinMoin/converter/rst_in.py

View file
  • Ignore whitespace
 from __future__ import absolute_import, division
 
 import re
-import py
+import pytest
 
 from MoinMoin import log
 logging = log.getLogger(__name__)
 from ._util import decode_data, normalize_split_text
 
 #### TODO: try block (do not crash if we don't have docutils)
-py.test.importorskip('docutils')
+pytest.importorskip('docutils')
 from docutils import nodes, utils, writers, core
 from docutils.parsers.rst import Parser
 from docutils.nodes import reference, literal_block

File MoinMoin/items/_tests/test_Item.py

View file
  • Ignore whitespace
         result2 = item.count_items()
         assert result2 == 2
 
-class TestBinary:
+class TestBinary(object):
     """ Test for arbitrary binary items """
 
     def test_get_templates(self):
         with pytest.raises(NotImplementedError):
             item.put_member('example1.txt', filecontent, content_length, expected_members=members)
 
-class TestTransformableBitmapImage:
+class TestTransformableBitmapImage(object):
 
     def test__transform(self):
         item_name = u'image_Item'

File MoinMoin/macro/_tests/test_Date.py

View file
  • Ignore whitespace
 from MoinMoin.macro.Date import MacroDateTimeBase, Macro
 import pytest
 
-class TestMacroDateTimeBase:
+class TestMacroDateTimeBase(object):
     def test_parse_time(self):
         MacroDateTimeBase_obj = MacroDateTimeBase()
         test_time_args = '2011-08-07T11:11:11+0533'
             # things after next 10,000 years can't be predicted
             MacroDateTimeBase_obj.parse_time('12011-08-07T11:11:11')
 
-class TestMacro:
+class TestMacro(object):
     def test_macro(self):
         macro_obj = Macro()
         # when arguments is None

File MoinMoin/macro/_tests/test_GetVal.py

View file
  • Ignore whitespace
 import pytest
 DATA = "This is a dict item."
 
-class TestMacro:
+class TestMacro(object):
     """ Test: GetVal.Macro """
 
     def setup_method(self, method):

File MoinMoin/util/_tests/test_diff_text.py

View file
  • Ignore whitespace
 
 from MoinMoin.util import diff_text
 
-class TestDiffText:
+class TestDiffText(object):
 
     def testDiff(self):
         """ util.diff_text.diff: test correct diff calculation """

File MoinMoin/util/_tests/test_filesys.py

View file
  • Ignore whitespace
 win32_only = pytest.mark.skipif("sys.platform != 'win32'")
 win32_incompatible = pytest.mark.skipif("sys.platform == 'win32'")
 
-class TestFuid:
+class TestFuid(object):
     """ test filesys.fuid (a better mtime() alternative for up-to-date checking) """
 
     def setup_method(self, method):
         assert uid2 != uid1  # should be considered stale if platform has no inode support
 
 
-class TestRename:
+class TestRename(object):
     """ test filesys.rename* """
 
     def setup_method(self, method):
         assert not os.path.exists(self.src)
 
 
-class TestCopy:
+class TestCopy(object):
     """test filesys.copytree"""
 
     def setup_method(self, method):

File MoinMoin/util/_tests/test_forms.py

View file
  • Ignore whitespace
 from MoinMoin.util import forms
 import pytest
 
-class Bind:
+class Bind(object):
     """ class for self defined test_bind attributes """
     def __init__(self):
         self.label = 'test_content'

File MoinMoin/util/_tests/test_pycdb.py

View file
  • Ignore whitespace
 import pytest
 from MoinMoin.util import pycdb
 
-class TestCDBMaker:
+class TestCDBMaker(object):
     """ Test: util.pycdb.CDBMaker """
 
     def setup_method(self, method):
         expected = ['test_cdbfile']
         assert result == expected
 
-class TestCDBReader:
+class TestCDBReader(object):
     """ Test: util.pycdb.CDBReader """
 
     def setup_method(self, method):

File MoinMoin/util/_tests/test_send_file.py

View file
  • Ignore whitespace
 from MoinMoin.util import send_file
 import pytest
 
-class TestFuid:
+class TestFuid(object):
     """ test for send_file """
 
     def setup_method(self, method):

File MoinMoin/util/_tests/test_util.py

View file
  • Ignore whitespace
 
 from MoinMoin import util
 
-class TestUtil:
+class TestUtil(object):
 
     def testRangeList(self):
         """ util.rangelist: test correct function for misc. input values """