def test_create_parser(self): machine_name = 'ReplicatorSingle' parser = makerbot_driver.create_parser(machine_name, legacy=False) self.assertTrue(parser.__class__.__name__ == 'GcodeParser') self.assertEqual(getattr(parser, 's3g'), None) self.assertTrue(parser.state.__class__.__name__ == 'GcodeStates') self.assertTrue( parser.state.profile.values['type'] == "The Replicator Single")
def test_create_parser_legacy(self): machine_name = 'TOMStepstruderSingle' parser = makerbot_driver.create_parser(machine_name, legacy=True) self.assertTrue(parser.__class__.__name__ == 'GcodeParser') self.assertEqual(getattr(parser, 's3g'), None) self.assertTrue(parser.state.__class__.__name__ == 'LegacyGcodeStates') self.assertTrue(parser.state.profile.values['type'] == "Thing-O-Matic Single, Stepstruder Mk6+")