ncraike / fang

Dependency injection system for Python
MIT License
15 stars 1 forks source link

Unittests #2

Open zachswift615 opened 8 years ago

zachswift615 commented 8 years ago

@ncraike, If I were to write some tests for fang, do you have a preference between unittest and pytest? I am considering using this library in a project.

edit Sorry, I just noticed the testing branch

zachswift615 commented 8 years ago

On that note, do you plan on keeping the tests in a separate branch? I see there are 39 passing tests and that would be good to have on the main branch.

ncraike commented 8 years ago

Sorry, just saw this.

I'm currently in the middle of writing unit tests using py.test. I kind of got lost in tool-writing and yak shaving for a bit too long, and then the project kind of got paused because I was too busy with other commitments.

Eventually when the tests are finished, I plan to merge them into the main branches.

I will try to finish the unit tests in the next couple weeks. If that doesn't happen, I could let you have a go. At the moment I'd be worried about a) you redoing some work I've done, b) our tests not meshing together.

On 22 Jul 2016 3:01 AM, "Zach Swift" notifications@github.com wrote:

On that note, do you plan on keeping the tests in a separate branch?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ncraike/fang/issues/2#issuecomment-234317119, or mute the thread https://github.com/notifications/unsubscribe-auth/ABDtFWHYw_vEzXXK4vyWB7R1PXEqjFQEks5qX6XNgaJpZM4JR_rx .

zachswift615 commented 8 years ago

Thanks for the reply That sounds good. I'll check back in a couple weeks!

Sent from my iPhone

On Jul 25, 2016, at 9:03 PM, Nathan Craike notifications@github.com wrote:

Sorry, just saw this.

I'm currently in the middle of writing unit tests using py.test. I kind of got lost in tool-writing and yak shaving for a bit too long, and then the project kind of got paused because I was too busy with other commitments.

Eventually when the tests are finished, I plan to merge them into the main branches.

I will try to finish the unit tests in the next couple weeks. If that doesn't happen, I could let you have a go. At the moment I'd be worried about a) you redoing some work I've done, b) our tests not meshing together.

On 22 Jul 2016 3:01 AM, "Zach Swift" notifications@github.com wrote:

On that note, do you plan on keeping the tests in a separate branch?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ncraike/fang/issues/2#issuecomment-234317119, or mute the thread https://github.com/notifications/unsubscribe-auth/ABDtFWHYw_vEzXXK4vyWB7R1PXEqjFQEks5qX6XNgaJpZM4JR_rx .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

ncraike commented 7 years ago

@2achary I've finished the tests for the ResourceProviderRegister, and all current unit tests have now been merged into master and released.

The current unit tests are here, and give code coverage of 80%.

I still need to add unit tests for the remaining classes/modules, primarily DependencyResolver in fang/resolver.py. There's also fang/di.py and fang/errors.py, but these are much simpler than the other modules.

Hopefully the existing unit tests will be useful to you, though. :)

ncraike commented 7 years ago

Oh, I also need to get the Travis and Codecov badges on the project home page, so that's more visible to people viewing the project.

EDIT: This is done now.