-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
huge update on look and backend of plots; easy make cmd for figure ge…
…neration added; scripts slightly modified; figures updated
- Loading branch information
Felix Simkovic
committed
Feb 8, 2017
1 parent
c33b01d
commit 0c35fcc
Showing
11 changed files
with
217 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
"""Testing facility for conkit.plot._Figure""" | ||
|
||
__author__ = "Felix Simkovic" | ||
__date__ = "08 Feb 2017" | ||
|
||
from conkit.plot._Figure import Figure | ||
|
||
import unittest | ||
|
||
|
||
class Test(unittest.TestCase): | ||
|
||
def test__init__(self): | ||
f = Figure() | ||
self.assertEqual(300, f.dpi) | ||
self.assertEqual("png", f.format) | ||
self.assertEqual("conkit", f.prefix) | ||
|
||
f = Figure(dpi=20, format="svg") | ||
self.assertEqual(20, f.dpi) | ||
self.assertEqual("svg", f.format) | ||
self.assertEqual("conkit", f.prefix) | ||
|
||
self.assertRaises(ValueError, Figure, format="ooo") | ||
|
||
def test_dpi(self): | ||
f = Figure() | ||
self.assertEqual(300, f.dpi) | ||
f.dpi = 20 | ||
self.assertEqual(20, f.dpi) | ||
|
||
def test_filename(self): | ||
f = Figure() | ||
self.assertEqual("conkit.png", f.file_name) | ||
f.file_name = "test.eps" | ||
self.assertEqual("test.eps", f.file_name) | ||
self.assertEqual("eps", f.format) | ||
self.assertEqual("test", f.prefix) | ||
f.format = "pdf" | ||
self.assertEqual("test.pdf", f.file_name) | ||
self.assertEqual("pdf", f.format) | ||
self.assertEqual("test", f.prefix) | ||
self.assertRaises(ValueError, setattr, f, "file_name", "test.ooo") | ||
|
||
def test_format(self): | ||
f = Figure() | ||
self.assertEqual("png", f.format) | ||
f.format = "pdf" | ||
self.assertEqual("pdf", f.format) | ||
f.format = "ps" | ||
self.assertEqual("ps", f.format) | ||
f.format = "png" | ||
self.assertEqual("png", f.format) | ||
self.assertRaises(ValueError, setattr, f, "format", "bbb") | ||
|
||
def test_prefix(self): | ||
f = Figure() | ||
self.assertEqual("conkit", f.prefix) | ||
f.prefix = "test" | ||
self.assertEqual("test", f.prefix) | ||
f.prefix = "/path/to/prefix" | ||
self.assertEqual("/path/to/prefix", f.prefix) | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main(verbosity=2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.