def test_validate(self): filename = os.path.join(self.data_dir, 'qml-example-1.2-RC3.sc3ml') self.assertTrue(validate(filename)) self.assertFalse(validate(filename, version='0.8')) with self.assertRaises(ValueError) as e: validate(filename, version='0.10') expected_error = ("0.10 is not a supported version. Use one of " "these versions: ['0.7', '0.8', '0.9'].") self.assertEqual(e.exception.args[0], expected_error)
def test_validate(self): filename = os.path.join(self.data_dir, 'qml-example-1.2-RC3.sc3ml') self.assertTrue(validate(filename)) self.assertFalse(validate(filename, version='0.8')) with self.assertRaises(ValueError) as e: validate(filename, version='0.10') expected_error = ("0.10 is not a supported version. Use one of these " "versions: [0.3, 0.5, 0.6, 0.7, 0.8, 0.9].") self.assertEqual(e.exception.args[0], expected_error)