import unittest
from Tasks.MoleculeToAtoms import MyClass
class Test_parse(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_parsing(self):
self.assertEqual(MyClass().parse('H2O'), ({'H': 2, 'O': 1}))
self.assertEqual(MyClass().parse('Mg(OH)2'), ({'Mg': 1, 'O': 2, 'H': 2}))