-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from SongyanHou/built-intests
Built intests
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import unittest | ||
import instat_built_in as instat | ||
|
||
|
||
class TestBuiltIn(unittest.TestCase): | ||
def test_show(self): | ||
self.assertNotEqual(instat.show('helloworld'), None, 'show does not create a url') | ||
|
||
def test_search(self): | ||
self.assertNotEqual(instat.search('helloworld'), None, 'search does not generate media') | ||
|
||
def test_barchart(self): | ||
instat.barchart([1, 2, 3], [1, 2, 3]) | ||
|
||
def test_piechart(self): | ||
instat.piechart([40, 10, 20, 30], ['Project', 'Homework', 'Midterm', 'Final'], 'PLT Grades') | ||
|
||
def test_linechart(self): | ||
instat.linechart([1, 2, 3], [1, 2, 3]) | ||
|
||
if __name__ == '__main__': | ||
suite = unittest.TestLoader().loadTestsFromTestCase(TestBuiltIn) | ||
unittest.TextTestRunner(verbosity=2).run(suite) |
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