Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyrasite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
pyrasite
Commits
930523ba
Commit
930523ba
authored
Mar 18, 2012
by
Luke Macken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get the test suite running on py2.4 -> py3.x
parent
9acbd581
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
tests/test_code_injection.py
tests/test_code_injection.py
+6
-2
No files found.
tests/test_code_injection.py
View file @
930523ba
...
...
@@ -20,6 +20,7 @@ import subprocess
from
pyrasite.inject
import
CodeInjector
class
TestCodeInjection
(
unittest
.
TestCase
):
def
test_injection
(
self
):
...
...
@@ -31,7 +32,8 @@ class TestCodeInjection(unittest.TestCase):
ci
.
inject
(
'pyrasite/payloads/helloworld.py'
)
stdout
,
stderr
=
p
.
communicate
()
assert
'Hello World!'
in
stdout
,
"Code injection failed"
assert
'Hello World!'
in
stdout
.
decode
(
'utf-8'
),
\
"Code injection failed"
def
test_multithreaded_injection
(
self
):
cmd
=
[
...
...
@@ -46,7 +48,9 @@ class TestCodeInjection(unittest.TestCase):
ci
.
inject
(
'pyrasite/payloads/helloworld.py'
)
stdout
,
stderr
=
p
.
communicate
()
assert
'Hello World!'
in
stdout
,
"Multi-threaded code injection failed"
assert
'Hello World!'
in
stdout
.
decode
(
'utf-8'
),
\
"Multi-threaded code injection failed"
if
__name__
==
'__main__'
:
unittest
.
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment