From d3b991895c3c7f19d0994e1d1e73fd38395044c5 Mon Sep 17 00:00:00 2001 From: James Lu Date: Mon, 27 Jan 2020 08:00:28 -0800 Subject: [PATCH] SedRegex: skip testReDoSTimeout if multiprocessing is disabled --- plugins/SedRegex/test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/SedRegex/test.py b/plugins/SedRegex/test.py index 9300ebb16..50a045ca5 100644 --- a/plugins/SedRegex/test.py +++ b/plugins/SedRegex/test.py @@ -1,5 +1,5 @@ ### -# Copyright (c) 2017-2019, James Lu +# Copyright (c) 2017-2020, James Lu # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -29,6 +29,7 @@ ### from __future__ import print_function +import unittest from supybot.test import * class SedRegexTestCase(ChannelPluginTestCase): @@ -173,6 +174,7 @@ class SedRegexTestCase(ChannelPluginTestCase): m = self.getMsg(' ') self.assertIn('Segmentation fault (core dumped)', str(m)) + @unittest.skipIf(world.disableMultiprocessing, "Test requires multiprocessing to be enabled") def testReDoSTimeout(self): # From https://snyk.io/blog/redos-and-catastrophic-backtracking/ for idx in range(500):