Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scapy
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test-restored
platform
external
scapy
Commits
911f1d6c
Commit
911f1d6c
authored
8 years ago
by
gpotter2
Browse files
Options
Downloads
Patches
Plain Diff
Better tests + fixes
parent
8666c131
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
appveyor.yml
+1
-1
1 addition, 1 deletion
appveyor.yml
test/mock_windows.uts
+20
-2
20 additions, 2 deletions
test/mock_windows.uts
with
21 additions
and
3 deletions
appveyor.yml
+
1
−
1
View file @
911f1d6c
...
@@ -31,7 +31,7 @@ test_script:
...
@@ -31,7 +31,7 @@ test_script:
-
'
del
test\bpf.uts'
# Don't bother with BPF regression tests
-
'
del
test\bpf.uts'
# Don't bother with BPF regression tests
-
"
%PYTHON%
\\
python
-m
coverage
run
--parallel-mode
bin
\\
UTscapy
-c
test
\\
configs
\\
windows.utsc
||
exit
/b
42"
-
"
%PYTHON%
\\
python
-m
coverage
run
--parallel-mode
bin
\\
UTscapy
-c
test
\\
configs
\\
windows.utsc
||
exit
/b
42"
# T
ls
unit tests
# T
LS
unit tests
# Note: due to a multiprocessing bug, we got to be in the UTscapy.py folder and call it directly
# Note: due to a multiprocessing bug, we got to be in the UTscapy.py folder and call it directly
-
'
cd
scapy/tools'
-
'
cd
scapy/tools'
-
"
%PYTHON%
\\
python
-m
coverage
run
--concurrency=multiprocessing
UTscapy.py
-f
text
-t
..
\\
..
\\
test
\\
tls
\\
tests_tls_netaccess.uts
-F
-P
\"
sys.path.append(os.path.abspath('../../test/tls'))
\"
-K
open_ssl_client
||
exit
/b
42"
-
"
%PYTHON%
\\
python
-m
coverage
run
--concurrency=multiprocessing
UTscapy.py
-f
text
-t
..
\\
..
\\
test
\\
tls
\\
tests_tls_netaccess.uts
-F
-P
\"
sys.path.append(os.path.abspath('../../test/tls'))
\"
-K
open_ssl_client
||
exit
/b
42"
...
...
This diff is collapsed.
Click to expand it.
test/mock_windows.uts
+
20
−
2
View file @
911f1d6c
...
@@ -209,9 +209,27 @@ assert _correct
...
@@ -209,9 +209,27 @@ assert _correct
= show_interfaces
= show_interfaces
from scapy.arch import *
from scapy.arch import show_interfaces
show_interfaces()
from StringIO import StringIO
@mock.patch('sys.stdout', new_callable=StringIO)
def test_show_interfaces(mock_stdout):
show_interfaces()
lines = mock_stdout.getvalue().split("\n")[1:]
for l in lines:
if not l.strip():
continue
try:
int(l[0])
except:
sys.stderr.write(l)
return False
return True
assert test_show_interfaces()
= dev_from_pcapname
= dev_from_pcapname
from scapy.config import conf
assert dev_from_pcapname(conf.iface.pcap_name).guid == conf.iface.guid
assert dev_from_pcapname(conf.iface.pcap_name).guid == conf.iface.guid
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment