Skip to content

Linted tests directory #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 20, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions tests/test_MIDIMessage_unittests.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# pylint: disable=invalid-name
# SPDX-FileCopyrightText: 2019 Kevin J. Walters for Adafruit Industries
#
# SPDX-License-Identifier: MIT
# pylint: enable=invalid-name

import unittest

Expand Down Expand Up @@ -29,7 +31,9 @@
# pylint: enable=wrong-import-position


class Test_MIDIMessage_from_message_byte_tests(unittest.TestCase):
class Test_MIDIMessage_from_message_byte_tests(
unittest.TestCase
): # pylint: disable=invalid-name
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kattni In cases where the invalid-name warnings are for classes and methods, is this the correct way to do it? I didn't think it'd be a good idea to change the names since that would break existing code, but I'd be fine doing that if it's the correct way to do it.

def test_NoteOn_basic(self):
data = bytes([0x90, 0x30, 0x7F])
ichannel = 0
Expand Down Expand Up @@ -316,7 +320,9 @@ def test_Empty(self):
self.assertEqual(skipped, 0)


class Test_MIDIMessage_NoteOn_constructor(unittest.TestCase):
class Test_MIDIMessage_NoteOn_constructor(
unittest.TestCase
): # pylint: disable=invalid-name
def test_NoteOn_constructor_string(self):
object1 = NoteOn("C4", 0x64)
self.assertEqual(object1.note, 60)
Expand Down Expand Up @@ -356,7 +362,9 @@ def test_NoteOn_constructor_bogusstring(self):
NoteOn("CC4", 0x7F)


class Test_MIDIMessage_NoteOff_constructor(unittest.TestCase):
class Test_MIDIMessage_NoteOff_constructor(
unittest.TestCase
): # pylint: disable=invalid-name
# mostly cut and paste from NoteOn above
def test_NoteOff_constructor_string(self):
object1 = NoteOff("C4", 0x64)
Expand Down