Ruff pandas vet (#10281)

* Python linting: Add ruff rules for Pandas-vet and Pytest-style

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
Christian Clauss
2023-10-11 20:30:02 +02:00
committed by GitHub
parent d5323dbaee
commit 3f094fe49d
28 changed files with 260 additions and 241 deletions

View File

@ -20,12 +20,12 @@ class Test(unittest.TestCase):
val = [0]
w = [0]
c = len(val)
self.assertEqual(k.knapsack(cap, w, val, c), 0)
assert k.knapsack(cap, w, val, c) == 0
val = [60]
w = [10]
c = len(val)
self.assertEqual(k.knapsack(cap, w, val, c), 0)
assert k.knapsack(cap, w, val, c) == 0
def test_easy_case(self):
"""
@ -35,7 +35,7 @@ class Test(unittest.TestCase):
val = [1, 2, 3]
w = [3, 2, 1]
c = len(val)
self.assertEqual(k.knapsack(cap, w, val, c), 5)
assert k.knapsack(cap, w, val, c) == 5
def test_knapsack(self):
"""
@ -45,7 +45,7 @@ class Test(unittest.TestCase):
val = [60, 100, 120]
w = [10, 20, 30]
c = len(val)
self.assertEqual(k.knapsack(cap, w, val, c), 220)
assert k.knapsack(cap, w, val, c) == 220
if __name__ == "__main__":