Skip to content

Tests using raises are not being asserted #52

Closed
@czgdp1807

Description

@czgdp1807

Description of the problem

I was observing the test files and found that tests which use raises are not being asserted which was due to absence of return statement in,

def raises(exception, code):
"""
Utility for testing exceptions.
Parameters
==========
exception
A valid python exception
code: lambda
Code that causes exception
"""
with pytest.raises(exception):
code()

However with merging of #51 raises will return True on successful execution, hence all the tests of the following format,

raises(...)

are to be replace with the format below,

assert raises(...)

Example of the problem

References/Other comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions