-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finished configuration features and tests
- Loading branch information
cceremuga
committed
Apr 19, 2017
1 parent
84e2c72
commit c862b64
Showing
8 changed files
with
86 additions
and
60 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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"radio": { | ||
"rtl": { | ||
"frequency": "144390000", | ||
"gain": "49.6" | ||
"gain": "49.6", | ||
"sample_rate": "22050" | ||
} | ||
} |
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
Empty file.
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,26 @@ | ||
from pypacket.base.configuration import Configuration | ||
|
||
class TestConfiguration: | ||
def test_frequency_expect_frequency(self, capsys): | ||
test_configuration = Configuration() | ||
expected_frequency = '144390000' | ||
|
||
actual_frequency = test_configuration.frequency() | ||
|
||
assert actual_frequency == expected_frequency | ||
|
||
def test_sample_rate_expect_sample_rate(self, capsys): | ||
test_configuration = Configuration() | ||
expected_sample_rate = '22050' | ||
|
||
actual_sample_rate = test_configuration.sample_rate() | ||
|
||
assert actual_sample_rate == expected_sample_rate | ||
|
||
def test_gain_expect_gain(self, capsys): | ||
test_configuration = Configuration() | ||
expected_gain = '49.6' | ||
|
||
actual_gain = test_configuration.gain() | ||
|
||
assert actual_gain == expected_gain |
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