def test_nonexistent_patternfile(self): self.assertIsNone(Command.maybe_load_pattern_file('/nonexistent/file'))
def test_nonexistent_patternfile(self): self.assertIsNone(Command.maybe_load_pattern_file('/nonexistent/file'))
def do_test(expected, patterns): with tempfile.NamedTemporaryFile() as tmp: tmp.write(patterns) tmp.flush() self.assertEqual(expected, Command.maybe_load_pattern_file(tmp.name))
def do_test(expected, patterns): with tempfile.NamedTemporaryFile() as tmp: tmp.write(patterns) tmp.flush() self.assertEqual(expected, Command.maybe_load_pattern_file(tmp.name))