def test_bad_params(self):
    self.assertRaises(ValueError, self.open, self.filename, 'wbt')
    self.assertRaises(ValueError, self.open, self.filename, 'xbt')
    self.assertRaises(ValueError, self.open, self.filename, 'rb', encoding='utf-8')
    self.assertRaises(ValueError, self.open, self.filename, 'rb', errors='ignore')
    self.assertRaises(ValueError, self.open, self.filename, 'rb', newline='\n')
def test_bad_params(self):
    self.assertRaises(ValueError, self.open, self.filename, 'wbt')
    self.assertRaises(ValueError, self.open, self.filename, 'xbt')
    self.assertRaises(ValueError, self.open, self.filename, 'rb', encoding='utf-8')
    self.assertRaises(ValueError, self.open, self.filename, 'rb', errors='ignore')
    self.assertRaises(ValueError, self.open, self.filename, 'rb', newline='\n')