def test_nonexistent_patternfile(self):
   self.assertIsNone(Command.maybe_load_pattern_file('/nonexistent/file'))
Esempio n. 2
0
 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))
Esempio n. 4
0
 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))