def test_counter(self):
        wrappedFactory = Server()
        f = TestLoggingFactory(wrappedFactory, 'test')
        self.assertEqual(f._counter, 0)
        f.buildProtocol(('1.2.3.4', 5678))
        self.assertEqual(f._counter, 1)
        # Reset log file
        f.openFile = None
        f.buildProtocol(('1.2.3.4', 5679))
        self.assertEqual(f._counter, 2)

        f.resetCounter()
        self.assertEqual(f._counter, 0)
Method to return unit number of a package from a NamData instance
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/test/test_policies.py/LoggingFactoryTestCase.test_counter--crossover with--dataset/ETHPy150Open modflowpy/flopy/flopy/utils/mfreadnam.py/getfiletypeunit