예제 #1
0
 def test_caches(self):
     """
     There's no need to have several loggers so we return the same one on
     each call.
     """
     f = ReturnLoggerFactory()
     assert f() is f()
예제 #2
0
 def test_ignores_args(self):
     """
     ReturnLogger doesn't take positional arguments.  If any are passed to
     the factory, they are not passed to the logger.
     """
     ReturnLoggerFactory()(1, 2, 3)
예제 #3
0
 def test_builds_returnloggers(self):
     f = ReturnLoggerFactory()
     assert isinstance(f(), ReturnLogger)