TemplatePreviewRenderer: inject also some dummy test data
ClosedPublic

Authored by kossebau on Jan 31 2017, 2:54 PM.

Diff Detail

Repository
R33 KDevPlatform
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau updated this revision to Diff 10767.Jan 31 2017, 2:54 PM
kossebau retitled this revision from to TemplatePreviewRenderer: inject also some dummy test data.
kossebau added a reviewer: KDevelop.
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptJan 31 2017, 2:54 PM

E.g. for file template Python>Basic>PyUnit this will now show in the preview:

#
# This file is licensed under the ExampleLicense 3.0
#

import unittest

class Example(unittest.TestCase):
    def setUp(self):
        # Called prior to each test method
        pass

    def tearDown(self):
        # Called after each test method
        pass

    def test_testFoo(self):
        pass

    def test_testBar(self):
        pass

    def test_testMore(self):
        pass

if __name__ == "__main__":
    unittest.main()

instead of

#
# This file is licensed under the ExampleLicense 3.0
#

import unittest

class Example(unittest.TestCase):
    def setUp(self):
        # Called prior to each test method
        pass

    def tearDown(self):
        # Called after each test method
        pass

if __name__ == "__main__":
    unittest.main()

Hm, looking at that I wonder if I should use data without "test" prefix, did that with the Qt unit test template in mind.

apol accepted this revision.Jan 31 2017, 2:59 PM
apol added a reviewer: apol.
This revision is now accepted and ready to land.Jan 31 2017, 2:59 PM
kossebau updated this revision to Diff 10770.Jan 31 2017, 3:16 PM
kossebau edited edge metadata.

use data without "test" prefix, looks strange in all non-qtest templates
sorry for having tested only now, too qt centric :)

This revision was automatically updated to reflect the committed changes.