Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up tests and add coverage reporting through coveralls (#38)
* Add coverage config to travis * Correct pip argrument error * Allow test in helpers.py to be discovered * Add coverage badge (linked to temporary branch) * Add back missing coverage packages for travis * Separate all test code (except for 'DummyRtlSdr') outside of the library code * Add check for travis env in sdr_cls fixture * Add fake librtlsdr to emulate the low-level functions Not yet implemented, needs to be monkeypatched in test fixtures * Use pytest.monkeypatch to override librtlsdr functions Removes the need to override base classes at the module level * Raise 'NotImplementedError' on async reads in tcp module * Clean up tcp test and handle expected exceptions * Add forgotten import * Move test from helpers module into tests directory * Make sure async module passes the generic test * Generate non-random data so it can be verified in tests * Test sampled data against generated data * Add PEP238 true division * Add support for direct sampling modes in tests * Add missing method on tcp module to support direct sampling tests * Ensure container type can be compared * Use str parameters for direct_sampling params in tests * Begin adding assertion tests for exceptions * Parameterize tests to run with and without numpy * Update pytest versions in travis env * Make sure device is closed for each test run * Import base RtlSdr class directly In Py>=3.5 it gets overridden by rtlsdraio and causes issues with tests * Avoid parameterized tests with asyncio * Change coverage badge to point to main repo
- Loading branch information
Showing
17 changed files
with
434 additions
and
400 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,2 @@ | ||
[run] | ||
source = rtlsdr/* |
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 was deleted.
Oops, something went wrong.
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,3 +1,3 @@ | ||
[pytest] | ||
testpaths = rtlsdr | ||
testpaths = tests | ||
python_files = *.py |
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
Oops, something went wrong.