CAM: Fixed script-style postprocessors getting the wrong __name__
Also added a test that the __name__ of the postprocessor is correct
This commit is contained in:
committed by
Yorik van Havre
parent
d3ffef0df7
commit
77a05049d5
@@ -360,6 +360,11 @@ class TestPostProcessorFactory(unittest.TestCase):
|
||||
self.assertTrue(post is not None)
|
||||
self.assertTrue(hasattr(post, "_buildPostList"))
|
||||
|
||||
def test040(self):
|
||||
"""Test that the __name__ of the postprocessor is correct."""
|
||||
post = PostProcessorFactory.get_post_processor(self.job, "linuxcnc")
|
||||
self.assertEqual(post.script_module.__name__, "linuxcnc_post")
|
||||
|
||||
|
||||
class TestPostProcessorClass(unittest.TestCase):
|
||||
"""Test new post structure objects."""
|
||||
@@ -383,21 +388,21 @@ class TestPostProcessorClass(unittest.TestCase):
|
||||
|
||||
def test010(self):
|
||||
"""Test the export function."""
|
||||
post = PostProcessorFactory.get_post_processor(job, "linuxcnc")
|
||||
post = PostProcessorFactory.get_post_processor(self.job, "linuxcnc")
|
||||
sections = post.export()
|
||||
for sec in sections:
|
||||
print(sec[0])
|
||||
|
||||
def test020(self):
|
||||
"""Test the export function with splitting."""
|
||||
post = PostProcessorFactory.get_post_processor(job, "linuxcnc")
|
||||
post = PostProcessorFactory.get_post_processor(self.job, "linuxcnc")
|
||||
sections = post.export()
|
||||
for sec in sections:
|
||||
print(sec[0])
|
||||
|
||||
def test030(self):
|
||||
"""Test the export function with splitting."""
|
||||
post = PostProcessorFactory.get_post_processor(job, "generic")
|
||||
post = PostProcessorFactory.get_post_processor(self.job, "generic")
|
||||
sections = post.export()
|
||||
for sec in sections:
|
||||
print(sec[0])
|
||||
|
||||
Reference in New Issue
Block a user