yolothreat / utilitybelt

A Python library for being a CND Batman....
MIT License
35 stars 12 forks source link

Bro, do you even test? #60

Closed blackfist closed 9 years ago

blackfist commented 9 years ago

The is_fqdn wasn't being tested in the tests.py file. Not sure how you were getting that 100% coverage. Anyway, the is_fqdn function was not wrapping the re.match in bool like the other is_* functions were so I fixed that and tested it. Enjoy.

krmaxwell commented 9 years ago

Nice catch, proving that 100% test coverage does not mean good testing!

For the record, it turns out that other properly-tested functions call is_fqdn() so the test suite sees statements executed. But explicit testing is the proper approach for sure.