Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New read_routes6() function and unit tests #127

Merged
merged 2 commits into from
May 18, 2016
Merged

Conversation

guedou
Copy link
Member

@guedou guedou commented Apr 12, 2016

Here is an attempt at fixing Issue #109 by rewriting scapy.unix.read_routes6().

This patch provides mocked tests that ease reproducing outputs on several
operating systems. Scapy tests from regression.uts were also tested on real OS. I can not swear that this patch does not introduce any regressions or bugs by itself, but I tried my best not to.

read_routes6() can be tested as follows:

$ PYTHONPATH=. py.test test/mocked_functions.py -vx

It could be interesting to extend the idea mocked_functions.py to other part of
Scapy, and to run this tests with Travis along with the classic regression tests.

@guedou guedou added the bug label Apr 12, 2016
@p-l-
Copy link
Member

p-l- commented May 2, 2016

As discussed IRL, @guedou can you check and tell me whether it would be possible to import mock from a standard .uts test file?

@p-l- p-l- assigned guedou and unassigned p-l- May 2, 2016
@guedou
Copy link
Member Author

guedou commented May 6, 2016

Here is an attempt to move the mocked tests to regressions.uts. The result is not a nice as the first attempt due to syntax limitations on UT Scapy.

Moreover, it introduces a dependency on the mock module, as it requires the mock module to be installed in order to pass all the tests. I wonder if we should move the mocked UT outside of regression.uts

@p-l- p-l- merged commit 217b865 into secdev:master May 18, 2016
@guedou guedou deleted the read_routes6 branch September 11, 2017 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants