Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
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
TeDomum
Matrix
Commits
9a7e0d2e
Unverified
Commit
9a7e0d2e
authored
4 years ago
by
Erik Johnston
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Don't require hiredis to run unit tests (#8680)
parent
c97da1e4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/8680.misc
+1
-0
1 addition, 0 deletions
changelog.d/8680.misc
tests/replication/_base.py
+10
-1
10 additions, 1 deletion
tests/replication/_base.py
with
11 additions
and
1 deletion
changelog.d/8680.misc
0 → 100644
+
1
−
0
View file @
9a7e0d2e
Don't require `hiredis` package to be installed to run unit tests.
This diff is collapsed.
Click to expand it.
tests/replication/_base.py
+
10
−
1
View file @
9a7e0d2e
...
@@ -16,7 +16,6 @@ import logging
...
@@ -16,7 +16,6 @@ import logging
from
typing
import
Any
,
Callable
,
List
,
Optional
,
Tuple
from
typing
import
Any
,
Callable
,
List
,
Optional
,
Tuple
import
attr
import
attr
import
hiredis
from
twisted.internet.interfaces
import
IConsumer
,
IPullProducer
,
IReactorTime
from
twisted.internet.interfaces
import
IConsumer
,
IPullProducer
,
IReactorTime
from
twisted.internet.protocol
import
Protocol
from
twisted.internet.protocol
import
Protocol
...
@@ -39,12 +38,22 @@ from synapse.util import Clock
...
@@ -39,12 +38,22 @@ from synapse.util import Clock
from
tests
import
unittest
from
tests
import
unittest
from
tests.server
import
FakeTransport
,
render
from
tests.server
import
FakeTransport
,
render
try
:
import
hiredis
except
ImportError
:
hiredis
=
None
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
class
BaseStreamTestCase
(
unittest
.
HomeserverTestCase
):
class
BaseStreamTestCase
(
unittest
.
HomeserverTestCase
):
"""
Base class for tests of the replication streams
"""
"""
Base class for tests of the replication streams
"""
# hiredis is an optional dependency so we don't want to require it for running
# the tests.
if
not
hiredis
:
skip
=
"
Requires hiredis
"
servlets
=
[
servlets
=
[
streams
.
register_servlets
,
streams
.
register_servlets
,
]
]
...
...
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