Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
coolamqp
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
public
coolamqp
Commits
cc3c6c71
Unverified
Commit
cc3c6c71
authored
9 months ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
add unit tests for Python 2.7
parent
f3fe17bb
No related branches found
No related tags found
No related merge requests found
Pipeline
#62159
failed with stages
in 1 minute and 41 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+2
-2
2 additions, 2 deletions
.gitlab-ci.yml
setup.py
+1
-1
1 addition, 1 deletion
setup.py
tests/test_framing.py
+2
-3
2 additions, 3 deletions
tests/test_framing.py
tests/test_objects.py
+2
-3
2 additions, 3 deletions
tests/test_objects.py
with
7 additions
and
9 deletions
.gitlab-ci.yml
+
2
−
2
View file @
cc3c6c71
...
...
@@ -10,7 +10,7 @@ stages:
alias
:
rabbitmq
before_script
:
-
python setup.py install
-
pip install --break-system-packages nose2 coverage requests yapf
-
pip install --break-system-packages nose2 coverage requests yapf
unittest2
-
coverage run --append -m compile_definitions
artifacts
:
paths
:
...
...
@@ -56,7 +56,7 @@ unittest_epoll_python27:
extends
:
.before_test
image
:
python:2.7
before_script
:
-
pip install nose2 coverage
-
pip install nose2 coverage
unittest2
-
python setup.py install
script
:
-
coverage run --append -m nose2 -F -vv
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
cc3c6c71
...
...
@@ -6,7 +6,7 @@ setup(keywords=['amqp', 'rabbitmq', 'client', 'network', 'ha', 'high availabilit
version
=
__version__
,
packages
=
find_packages
(
include
=
[
'
coolamqp
'
,
'
coolamqp.*
'
]),
install_requires
=
[
'
six
'
],
tests_require
=
[
"
pytest
"
,
"
coverage
"
],
tests_require
=
[
"
pytest
"
,
"
coverage
"
,
"
unittest2
"
],
test_suite
=
'
nose2.collector.collector
'
,
python_requires
=
'
!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*
'
,
extras_require
=
{
...
...
This diff is collapsed.
Click to expand it.
tests/test_framing.py
+
2
−
3
View file @
cc3c6c71
...
...
@@ -7,8 +7,7 @@ from coolamqp.objects import argumentify
class
TestFraming
(
unittest
.
TestCase
):
def
test_
something
(
self
):
def
test_
enframing_arguments
(
self
):
buf
=
io
.
BytesIO
()
args
=
argumentify
({
'
x-match
'
:
'
all
'
,
'
format
'
:
'
pdf
'
})
res
=
enframe_table
(
buf
,
args
)
print
(
repr
(
res
))
enframe_table
(
buf
,
args
)
This diff is collapsed.
Click to expand it.
tests/test_objects.py
+
2
−
3
View file @
cc3c6c71
# coding=UTF-8
from
__future__
import
print_function
,
absolute_import
,
division
import
unittest
import
unittest
2
import
sys
from
coolamqp.objects
import
NodeDefinition
,
MessageProperties
,
Queue
class
TestObjects
(
unittest
.
TestCase
):
class
TestObjects
(
unittest
2
.
TestCase
):
def
test_message_properties
(
self
):
empty_p_msg
=
MessageProperties
()
ce_p_msg
=
MessageProperties
(
content_encoding
=
b
'
wtf
'
)
self
.
assertIn
(
'
wtf
'
,
str
(
ce_p_msg
))
@unittest.skipIf
(
sys
.
platform
.
startswith
(
'
2
'
),
'
Only Python 3 has assertWarns
'
)
def
test_warning
(
self
):
with
self
.
assertWarns
(
PendingDeprecationWarning
):
Queue
(
auto_delete
=
True
,
exclusive
=
False
)
...
...
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