ftao / python-ifcfg

Python cross-platform network interface discovery (ifconfig/ipconfig/ip)
BSD 3-Clause "New" or "Revised" License
55 stars 37 forks source link

Merge #39 and #41 and add tests - bump to 0.19 #42

Closed benjaoming closed 4 years ago

benjaoming commented 4 years ago

Dear new Contributors @fdellwing @StoneJia - it'd nice to have tests for your contributions, so we can verify them :)

codecov-io commented 4 years ago

Codecov Report

Merging #42 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #42   +/-   ##
=======================================
  Coverage   84.68%   84.68%           
=======================================
  Files           4        4           
  Lines         235      235           
=======================================
  Hits          199      199           
  Misses         36       36
Impacted Files Coverage Δ
src/ifcfg/parser.py 80% <ø> (ø) :arrow_up:
src/ifcfg/__init__.py 96.42% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4d846c7...f0748bb. Read the comment docs.

fdellwing commented 4 years ago

I'm new to python and generally not very skilled at writing tests, so thanks. The change you did to my regex brings the result in place with IUnixParser, so there could be an test added checking that.

Important note is, that the regex as you changed it, will match invalid VLAN interfaces (they can only have numbers after the dot).

P.S. The MTU PR has the number #39

benjaoming commented 4 years ago

Thanks @fdellwing - have changed the reference.

so there could be an test added checking that.

That's already added in testss/ip_tests.py :)

benjaoming commented 4 years ago

Released in 0.19