def test_from_file_object_ambiguous_table_specifier(self): with open(self.wpp_filename, 'rb') as f: extension = tcore.get_extension(self.wpp_filename) self.assertRaises( TypeError, lambda: xypath.Table.from_file_object( f, extension, table_name='NOTES', table_index=4))
def test_from_file_object_ambiguous_table_specifier(self): with open(self.wpp_filename, "rb") as f: extension = tcore.get_extension(self.wpp_filename) self.assertRaises( TypeError, lambda: xypath.Table.from_file_object(f, extension, table_name="NOTES", table_index=4) )
def test_from_file_object_table_name(self): with open(self.wpp_filename, 'rb') as f: extension = tcore.get_extension(self.wpp_filename) new_table = xypath.Table.from_file_object(f, extension, table_name='NOTES') self.assertEqual(1, len(new_table.filter('(2) Including Zanzibar.')))
def test_from_file_object_no_table_specifier(self): with open(self.wpp_filename, "rb") as f: extension = tcore.get_extension(self.wpp_filename) self.assertRaises(TypeError, lambda: xypath.Table.from_file_object(f, extension))
def test_from_file_object_table_name(self): with open(self.wpp_filename, "rb") as f: extension = tcore.get_extension(self.wpp_filename) new_table = xypath.Table.from_file_object(f, extension, table_name="NOTES") self.assertEqual(1, len(new_table.filter("(2) Including Zanzibar.")))
def test_from_file_object_no_table_specifier(self): with open(self.wpp_filename, 'rb') as f: extension = tcore.get_extension(self.wpp_filename) self.assertRaises( TypeError, lambda: xypath.Table.from_file_object(f, extension))
def test_from_file_object_table_index(self): with open(self.wpp_filename, 'rb') as f: extension = tcore.get_extension(self.wpp_filename) new_table = xypath.Table.from_file_object( f, extension, table_index=5) self.assertEqual(1, len(new_table.filter('(2) Including Zanzibar.')))