for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
import pytest
from mandos.model.mappings import Mappings
class TestMappings:
def test(self):
If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example
class Foo: def some_method(self, x, y): return x + y;
could be written as
class Foo: @classmethod def some_method(cls, x, y): return x + y;
mp = Mappings.from_resource("@targets_neuro.regexes")
This check looks for invalid names for a range of different identifiers.
You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.
If your project includes a Pylint configuration file, the settings contained in that file take precedence.
To find out more about Pylint, please refer to their site.
assert mp.get("Dopamine D3 receptor") == ["Dopamine 2/3/4 receptor", "D_{2/3/4}"]
assert mp.get("Cytochrome P450 2A6") == ["Cytochrome P450 2", "CYP2"]
if __name__ == "__main__":
pytest.main()