Changeset 56dac0b in sasview
- Timestamp:
- Sep 22, 2017 7:02:03 PM (7 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 26183bf
- Parents:
- dc8d1c2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/sasdataloader/test/utest_cansas.py
r574adc7 r56dac0b 4 4 import os 5 5 import sys 6 import StringIO6 from io import StringIO 7 7 import unittest 8 8 import logging … … 59 59 Should fail gracefully and send a message to logger.info() 60 60 """ 61 invalid = StringIO .StringIO('<a><c></b></a>')61 invalid = StringIO('<a><c></b></a>') 62 62 self.assertRaises(XMLSyntaxError, lambda: XMLreader(invalid)) 63 63 … … 71 71 string += "\t</xsd:complexType>\n" 72 72 string += "</xsd:schema>" 73 f = StringIO .StringIO(string)73 f = StringIO(string) 74 74 xmlschema_doc = etree.parse(f) 75 75 xmlschema = etree.XMLSchema(xmlschema_doc) 76 valid = etree.parse(StringIO .StringIO('<a><b></b></a>'))77 invalid = etree.parse(StringIO .StringIO('<a><c></c></a>'))76 valid = etree.parse(StringIO('<a><b></b></a>')) 77 invalid = etree.parse(StringIO('<a><c></c></a>')) 78 78 self.assertTrue(xmlschema.validate(valid)) 79 79 self.assertFalse(xmlschema.validate(invalid)) … … 211 211 # find the processing instructions and make into a dictionary 212 212 dic = self.get_processing_instructions(reader) 213 self.assert True(dic == {'xml-stylesheet': \214 213 self.assertEqual(dic, {'xml-stylesheet': 214 'type="text/xsl" href="cansas1d.xsl" '}) 215 215 216 216 xml = "<test><a><b><c></c></b></a></test>"
Note: See TracChangeset
for help on using the changeset viewer.