-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
66946ad
commit a9662a7
Showing
4 changed files
with
36 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import logging | ||
from unittest import TestCase | ||
|
||
from qudi_hira_analysis.helper_functions import ( | ||
decibelm_to_watts, | ||
format_exponent_as_str, | ||
log_tick_formatter, | ||
) | ||
|
||
logging.disable(logging.CRITICAL) | ||
|
||
|
||
class TestFitting(TestCase): | ||
def test_decibelm_to_watts(self): | ||
self.assertEqual(0.01, decibelm_to_watts(10)) | ||
|
||
def test_format_exponent_as_str(self): | ||
self.assertEqual( | ||
"${ 1.0 } \cdot 10^{ -4 }$", | ||
format_exponent_as_str(0.0001) | ||
) | ||
|
||
def test_log_tick_formatter(self): | ||
self.assertEqual( | ||
"$10^{1}$", | ||
log_tick_formatter(1) | ||
) |
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