[TIP] Bazinga insist on barfing "TypeError: coercing to Unicode: need string or buffer, NoneType found"

Phlip phlip2005 at gmail.com
Thu Oct 6 21:17:48 PDT 2011


The fix is just this; all but self-explanatory:

    def wantClass(self, cls):
        # This test is needed in order to prevent tests from being run
        # even if a module is passed as argument to Nose
        try:
            source = inspect.getsourcefile(cls)
+           if source is None:  return None
        except TypeError:
            return None

Why this newsgroup, instead of the vaunted but possibly non-existant
Bazinga mailing list(s)?

Mostly laziness; this is where I learned of Bazinga.

Other than that tweak I am still bazinga-ing along!

-- 
  Phlip
  http://c2.com/cgi/wiki?ZeekLand



More information about the testing-in-python mailing list