Test that worker cleanup happens

This commit is contained in:
Kovid Goyal 2022-04-02 06:26:47 +05:30
parent 44ccd8104b
commit 223444e208
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -218,6 +218,10 @@ def find_tests():
return re.sub(r'\s+', ' ', ans)
self.assertEqual(c(html), c(open(path, 'rb').read().decode('utf-8')))
self.assertRaises(ValueError, overseer.fetch_url, 'test', 'file:///does-not-exist.html')
w = overseer.workers
self.assertEqual(len(w), 1)
del overseer
self.assertFalse(w)
return unittest.defaultTestLoader.loadTestsFromTestCase(TestSimpleWebEngineScraper)