Example #1
0
 def test_guess_format_compressed(self, extention, compression_extention):
     file_name = 'file.{0}{1}'.format(extention, compression_extention)
     a = util.guess_format(file_name)
     # expect answer to always be uppercase
     assert a == extention.upper()
Example #2
0
 def test_guess_format_stream_ValueError(self):
     # This stream has no name, so can't guess format
     s = StringIO('this is a very fun file')
     with pytest.raises(ValueError):
         util.guess_format(s)
Example #3
0
    def _check_guess_format(self, f, fn):
        a = util.guess_format(fn)

        assert_equal(a, f)
Example #4
0
    def _check_guess_format(self, f, fn):
        a = util.guess_format(fn)

        assert a == f
Example #5
0
    def _check_guess_format(self, f, fn):
        a = util.guess_format(fn)

        assert a == f
Example #6
0
 def _check_guess_format(self, f, fn):
     a = util.guess_format(fn)
     # expect answer to always be uppercase
     assert_equal(a, f.upper())
Example #7
0
 def _check_guess_format(self, f, fn):
     a = util.guess_format(fn)
     # expect answer to always be uppercase
     assert_equal(a, f.upper())