You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to setup some basic testing env and runs so we understand how to structure the unit test files and datasets for this.
@chtsai0105 I am hoping you can help us get some of the basics started so we have examples of how to write this. We want to build unit tests around the different functions but also simple unit tests to show that dependencies are working.
So far we could use python #3 minimap as well as pysam for some of the steps we need to do instead of installing samtools and minimap2. I wonder if the python bwa mapper works - though I'd want to use a standard version of the software if possible as getting versions correct may vary the results. eg https://github.com/nanoporetech/bwapy
The text was updated successfully, but these errors were encountered:
Note that the unit test is used to test function that do a single action. E.g. the align function inside pipeline.py.
However in a pipeline tool you usually need to combine several functions into a pipeline function. In this case I use pytest.monkeypatch and corresponding mockreturn function to avoid redo the unit test that have already done. E.g. in the test_main_align test function of the tests/main_test.py I used monkeypatch to temporarily replace the align function imported in __main__.py to a mockreturn function, which simply print the keyword arguments and do nothing. By doing so I can test the main function inside __main__.py without truly run the codes.
Great. I started a test too mostly as a well test. Let’s see how I it all
works.
Sent from Gmail Mobile
***@***.***
Jason Stajich - UC Riverside
http://lab.stajich.org
On Wed, Jun 26, 2024 at 4:27 PM Cheng-Hung Tsai ***@***.***> wrote:
Note that the unit test is used to test function that do a single action.
E.g. the align function inside pipeline.py.
However in a pipeline tool you usually need to combine several functions
into a pipeline function. In this case I use pytest.monkeypatch and
corresponding mockreturn function to avoid redo the unit test that have
already done. E.g. in the test_main_align test function of the
tests/main_test.py I used monkeypatch to temporarily replace the align
function imported in __main__.py to a mockreturn function, which simply
print the keyword arguments and do nothing. By doing so I can test the
main function inside __main__.py without truly run the codes.
—
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAL5O5OLDU6D263JT63GR3ZJNE6JAVCNFSM6AAAAABJ6R5GIGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJSG44DEOJQGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
We need to setup some basic testing env and runs so we understand how to structure the unit test files and datasets for this.
@chtsai0105 I am hoping you can help us get some of the basics started so we have examples of how to write this. We want to build unit tests around the different functions but also simple unit tests to show that dependencies are working.
So far we could use python #3 minimap as well as pysam for some of the steps we need to do instead of installing samtools and minimap2. I wonder if the python bwa mapper works - though I'd want to use a standard version of the software if possible as getting versions correct may vary the results. eg https://github.com/nanoporetech/bwapy
The text was updated successfully, but these errors were encountered: