[wingide-users] Unknown type when using unittest

Wingware Support support at wingware.com
Tue Dec 1 08:00:06 MST 2009


Joshua J. Kugler wrote:
> I have code such as this:
> 
> import unittest
> 
> class TestTest(unittest.TestCase):
>     def test_test(self):
>         self.assertTrue
> 
> When typing it, when I hit the '.' in self, I get the popup list for 
> assertFoo. However, after I select a function (e.g. assertTrue), Wing 
> tells me "Cannot determine type."
> 
> Some simple glitch on my end? Bug in wing?

It's due to the distinction between finding a symbol and knowing its type.
Goto-definition does work here because Wing knows where the symbol is
defined.

In this case I think Wing is failing to extract the type from the way
assertTrue is defined:

   assert_ = assertTrue = failUnless

This case is on our list of things to add to the type inferencer.

Thanks,

-- 

Stephan Deibel
Wingware | Python IDE
Advancing Software Development

www.wingware.com



More information about the wingide-users mailing list