spacepaste

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
============================= test session starts ==============================
platform linux2 -- Python 3.2.3 -- pytest-2.3.4
collected 0 items / 1 errors

==================================== ERRORS ====================================
___________________ ERROR collecting tests/test_interface.py ___________________

self = <CallInfo when='memocollect' exception: 'tuple' object has no attribute 'pluginmate'>
func = <bound method Module._memocollect of <Module 'tests/test_interface.py'>>
when = 'memocollect'

    def __init__(self, func, when):
        #: context of invocation: one of "setup", "call",
        #: "teardown", "memocollect"
        self.when = when
        self.start = time()
        try:
            try:
>               self.result = func()

../../../.virtualenvs/blackbox/lib/python3.2/site-packages/_pytest/runner.py:121: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Module 'tests/test_interface.py'>

    def _memocollect(self):
        """ internal helper method to cache results of calling collect(). """
>       return self._memoizedcall('_collected', lambda: list(self.collect()))

../../../.virtualenvs/blackbox/lib/python3.2/site-packages/_pytest/main.py:366: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Module 'tests/test_interface.py'>, attrname = '_collected'
function = <function <lambda> at 0x1f73738>

    def _memoizedcall(self, attrname, function):
        exattrname = "_ex_" + attrname
        failure = getattr(self, exattrname, None)
        if failure is not None:
            py.builtin._reraise(failure[0], failure[1], failure[2])
        if hasattr(self, attrname):
            return getattr(self, attrname)
        try:
>           res = function()

../../../.virtualenvs/blackbox/lib/python3.2/site-packages/_pytest/main.py:287: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   return self._memoizedcall('_collected', lambda: list(self.collect()))

../../../.virtualenvs/blackbox/lib/python3.2/site-packages/_pytest/main.py:366: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Module 'tests/test_interface.py'>

    def collect(self):
>       self.session._fixturemanager.parsefactories(self)

../../../.virtualenvs/blackbox/lib/python3.2/site-packages/_pytest/python.py:347: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_pytest.python.FixtureManager object at 0x1f7c790>
node_or_obj = <Module 'tests/test_interface.py'>, nodeid = None
unittest = False

    def parsefactories(self, node_or_obj, nodeid=None, unittest=False):
        if nodeid is not None:
            holderobj = node_or_obj
        else:
>           holderobj = node_or_obj.obj

../../../.virtualenvs/blackbox/lib/python3.2/site-packages/_pytest/python.py:1546: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Module 'tests/test_interface.py'>

    def fget(self):
        try:
            return self._obj
        except AttributeError:
>           self._obj = obj = self._getobj()

../../../.virtualenvs/blackbox/lib/python3.2/site-packages/_pytest/python.py:205: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Module 'tests/test_interface.py'>

    def _getobj(self):
>       return self._memoizedcall('_obj', self._importtestmodule)

../../../.virtualenvs/blackbox/lib/python3.2/site-packages/_pytest/python.py:344: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Module 'tests/test_interface.py'>, attrname = '_obj'
function = <bound method Module._importtestmodule of <Module 'tests/test_interface.py'>>

    def _memoizedcall(self, attrname, function):
        exattrname = "_ex_" + attrname
        failure = getattr(self, exattrname, None)
        if failure is not None:
            py.builtin._reraise(failure[0], failure[1], failure[2])
        if hasattr(self, attrname):
            return getattr(self, attrname)
        try:
>           res = function()

../../../.virtualenvs/blackbox/lib/python3.2/site-packages/_pytest/main.py:287: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Module 'tests/test_interface.py'>

    def _importtestmodule(self):
        # we assume we are only called once per module
        try:
>           mod = self.fspath.pyimport(ensuresyspath=True)

../../../.virtualenvs/blackbox/lib/python3.2/site-packages/_pytest/python.py:353: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = local('/home/wdanilo/dev/blackbox/pluginmate/tests/test_interface.py')
modname = 'test_interface', ensuresyspath = True

    def pyimport(self, modname=None, ensuresyspath=True):
        """ return path as an imported python module.
                if modname is None, look for the containing package
                and construct an according module name.
                The module will be put/looked up in sys.modules.
            """
        if not self.check():
            raise py.error.ENOENT(self)
        #print "trying to import", self
        pkgpath = None
        if modname is None:
            pkgpath = self.pypkgpath()
            if pkgpath is not None:
                if ensuresyspath:
                    self._prependsyspath(pkgpath.dirpath())
                __import__(pkgpath.basename)
                pkg = sys.modules[pkgpath.basename]
                names = self.new(ext='').relto(pkgpath.dirpath())
                names = names.split(self.sep)
                if names and names[-1] == "__init__":
                    names.pop()
                modname = ".".join(names)
            else:
                # no package scope, still make it possible
                if ensuresyspath:
                    self._prependsyspath(self.dirpath())
                modname = self.purebasename
>           __import__(modname)

../../../.virtualenvs/blackbox/lib/python3.2/site-packages/py/_path/local.py:532: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_pytest.assertion.rewrite.AssertionRewritingHook object at 0x7f53b70f29d0>
name = 'test_interface'

    def load_module(self, name):
        co, pyc = self.modules.pop(name)
        # I wish I could just call imp.load_compiled here, but __file__ has to
        # be set properly. In Python 3.2+, this all would be handled correctly
        # by load_compiled.
        mod = sys.modules[name] = imp.new_module(name)
        try:
            mod.__file__ = co.co_filename
            # Normally, this attribute is 3.2+.
            mod.__cached__ = pyc
>           py.builtin.exec_(co, mod.__dict__)

../../../.virtualenvs/blackbox/lib/python3.2/site-packages/_pytest/assertion/rewrite.py:157: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import sys
    import os
    
    import logging
    
    
    dir = os.path.dirname(__file__)
    parent_dir = os.path.abspath(os.path.join(dir, os.path.pardir))
    sys.path.append(os.path.join(parent_dir, 'libs'))
    sys.path.append(parent_dir)
    
>   import pluginmate

tests/test_interface.py:12: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   from .pluginmate import PluginMate
E   AttributeError: 'tuple' object has no attribute 'pluginmate'

pluginmate/__init__.py:1: AttributeError
=========================== 1 error in 0.11 seconds ============================