Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Thomas Gambier
slapos.core
Commits
40bc7f38
Commit
40bc7f38
authored
Oct 21, 2014
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Interface tests: tell what class is wrong.
Instead of just failing with no clue except that 0 is equal to 0...
parent
f9126f6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
slapos/tests/interface.py
slapos/tests/interface.py
+2
-1
No files found.
slapos/tests/interface.py
View file @
40bc7f38
...
...
@@ -53,7 +53,8 @@ def getImplementationAssertionMethod(klass, interface):
def
getDeclarationAssertionMethod
(
klass
):
"""Returns method which verifies if klass is declaring interface"""
def
testMethod
(
self
):
self
.
assertNotEqual
(
0
,
len
(
list
(
zope
.
interface
.
implementedBy
(
klass
))))
if
len
(
list
(
zope
.
interface
.
implementedBy
(
klass
)))
==
0
:
self
.
fail
(
'%s class does not respect its interface(s).'
%
klass
.
__name__
)
return
testMethod
def
generateTestMethodListOnClass
(
klass
,
module
):
...
...
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