forked from merlinthered/sublime-rainmeter
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
40 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import sys | ||
|
||
from unittest import TestCase | ||
|
||
logger = sys.modules["Rainmeter.logger"] | ||
|
||
|
||
class TestFunctions(TestCase): | ||
|
||
def test_info(self): | ||
""" | ||
info should not through exceptions due to settings | ||
""" | ||
try: | ||
logger.info( | ||
__file__, | ||
"test_info(self)", | ||
"info test" | ||
) | ||
except Exception as error: | ||
self.fail("logger.info() raised exception '" + error + "'") | ||
|
||
def test_error(self): | ||
""" | ||
error should not through exception due to settings | ||
""" | ||
try: | ||
logger.error( | ||
__file__, | ||
"test_error(self)", | ||
"error test" | ||
) | ||
except Exception as error: | ||
self.fail("logger.error() raised exception '" + error + "'") |