diff options
| author | Nicolas Dufour <nicoduf@yahoo.fr> | 2012-02-09 05:23:20 +0000 |
|---|---|---|
| committer | JazzyNico <nicoduf@yahoo.fr> | 2012-02-09 05:23:20 +0000 |
| commit | dc889d60c52841858350ee854dc99bb2f33c229c (patch) | |
| tree | 2bea6e730c2fee15a10a62aa020512b38f4417e5 /share/extensions/test/perspective.test.py | |
| parent | (cppcheck and janitorial tasks:) C-style casting to C++-style casting (diff) | |
| download | inkscape-dc889d60c52841858350ee854dc99bb2f33c229c.tar.gz inkscape-dc889d60c52841858350ee854dc99bb2f33c229c.zip | |
Extensions. Unit tests improvement.
(bzr r10953)
Diffstat (limited to 'share/extensions/test/perspective.test.py')
| -rwxr-xr-x | share/extensions/test/perspective.test.py | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/share/extensions/test/perspective.test.py b/share/extensions/test/perspective.test.py index 3d4daf540..a10297507 100755 --- a/share/extensions/test/perspective.test.py +++ b/share/extensions/test/perspective.test.py @@ -1,26 +1,31 @@ #!/usr/bin/env python +''' +Unit test file for ../perspective.py +Revision history: + * 2012-01-28 (jazzynico): first working version (only checks the extension + with the default parameters). -# This is only the automatic generated test file for ../perspective.py -# This must be filled with real tests and this commentary -# must be cleared. -# If you want to help, read the python unittest documentation: -# http://docs.python.org/library/unittest.html +-- +If you want to help, read the python unittest documentation: +http://docs.python.org/library/unittest.html +''' import sys -sys.path.append('..') # this line allows to import the extension code - import unittest + +sys.path.append('..') # this line allows to import the extension code from perspective import * -class ProjectBasicTest(unittest.TestCase): +class PerspectiveBasicTest(unittest.TestCase): - #def setUp(self): + #def setUp(self): - def test_run_without_parameters(self): - args = [ 'minimal-blank.svg' ] - e = Project() - e.affect( args, False ) - #self.assertEqual( e.something, 'some value', 'A commentary about that.' ) + def test_run_without_parameters(self): + args = ['minimal-blank.svg'] + e = Project() + self.assertRaises(SystemExit, e.affect, args) if __name__ == '__main__': - unittest.main() + unittest.main() + #suite = unittest.TestLoader().loadTestsFromTestCase(PerspectiveBasicTest) + #unittest.TextTestRunner(verbosity=2).run(suite) |
