Example #1
0
    def test_open_or_none_opener_error(self):
        def bogus_opener(f):
            raise IOError('hahaha')

        with self.assertRaises(IOError):
            _open_or_none(bogus_opener, self.fna1)
Example #2
0
    def test_open_or_none_opener_error(self):
        def bogus_opener(f):
            raise IOError('hahaha')

        with self.assertRaises(IOError):
            _open_or_none(bogus_opener, self.fna1)
Example #3
0
 def test_open_or_none_no_opener(self):
     obs = _open_or_none(None, self.fna1)
     self.assertTrue(obs is None)
Example #4
0
 def test_open_or_none_no_opener(self):
     obs = _open_or_none(None, self.fna1)
     self.assertTrue(obs is None)