@unittest.skipIf(is_version_2p0, "this test fails but the '-x' option with XPath selectors still works fine in normal use")
def test_xpath_multi_results(self):
    fname = os.path.join(newdir, 'books.xml')
    query = f"-x -n '//bookstore//book[@category]' /{fname}"
    self.session.receive_query(query)
    correct_output = {fname: {('bookstore', 0): 'b\'<book category="cooking">\\n    <title lang="en">Everyday Italian</title>\\n    <author>Giada De Laurentiis</author>\\n    <year>2005</year>\\n    <price>30.00</price>\\n  </book>\\n  \'', ('bookstore', 1): 'b\'<book category="children">\\n    <title lang="en">Harry Potter</title>\\n    <author>J K. Rowling</author>\\n    <year>2005</year>\\n    <price>29.99</price>\\n  </book>\\n  \'', ('bookstore', 2): 'b\'<book category="web">\\n    <title lang="en">Learning XML</title>\\n    <author>Erik T. Ray</author>\\n    <year>2003</year>\\n    <price>39.95</price>\\n  </book>\\n\''}}
    self.assertEqual(self.session.resultset, correct_output)
@unittest.skipIf(is_version_2p0, "this test fails but the '-x' option with XPath selectors still works fine in normal use")
def test_xpath_multi_results(self):
    fname = os.path.join(newdir, 'books.xml')
    query = f"-x -n '//bookstore//book[@category]' /{fname}"
    self.session.receive_query(query)
    correct_output = {fname: {('bookstore', 0): 'b\'<book category="cooking">\\n    <title lang="en">Everyday Italian</title>\\n    <author>Giada De Laurentiis</author>\\n    <year>2005</year>\\n    <price>30.00</price>\\n  </book>\\n  \, ('bookstore', 1): 'b\'<book category="children">\\n    <title lang="en">Harry Potter</title>\\n    <author>J K. Rowling</author>\\n    <year>2005</year>\\n    <price>29.99</price>\\n  </book>\\n  \, ('bookstore', 2): 'b\'<book category="web">\\n    <title lang="en">Learning XML</title>\\n    <author>Erik T. Ray</author>\\n    <year>2003</year>\\n    <price>39.95</price>\\n  </book>\\n\}}
    self.assertEqual(self.session.resultset, correct_output)