kootenpv / access_points

Scan your WiFi and get access point information and signal quality
190 stars 27 forks source link

bug fix in iwlist and Windows & expanded tests #10

Closed KrisKusano closed 7 years ago

KrisKusano commented 7 years ago

Summary

  1. Fixed a bug in WindowsWifiScanner.parse_output where SSID would not match quality/BSID.
  2. Fixed a bug in IwlistWifiScanner.parse_output where quality of all but the last SSID would be incorrect.
  3. Added tests that check correctness of all access point listings.

How I discovered bugs

When running the new tests I added with the original code, both test_iwlist and test_windows fail. I discovered the bug when trying out your whereami project and getting crummy results on my Windows setup. After making the tests of all of the parsers, I found a bug similar to the Windows one in the IwlistWifiScanner (OSXWifiScanner passes).

kootenpv commented 7 years ago

Thanks a lot for the thorough work! I'll deploy to PyPi.

kootenpv commented 7 years ago

Updated since access_points-0.3.50. Feel free to test it out with pip install -U --no-cache access_points

kootenpv commented 7 years ago

Actually, I did an integration test on my own machine and it stopped working....

EDIT: This line is the problem: https://github.com/kootenpv/access_points/blob/master/access_points/__init__.py#L79

When I remove it, then it works again for OSX. Could you perhaps try to see if you could make this work without making it str() here? Note that I'm using py3 myself, so I wouldn't think it is necessary.

kootenpv commented 7 years ago

I found out we were both trying to ensure string at multiple locations, and it went weird like that.

Note there is the ensure_str function defined at the top. I just did another push.

Could you confirm pip3.5 install -U --no-cache access_points (access-points==0.3.52) is working?