Skip to content
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

Merge pull request #559 from iKostanOrg/master #560

Merged
merged 31 commits into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0851b44
Merge pull request #559 from iKostanOrg/master
ikostan Dec 15, 2024
d05afc2
Update .codeclimate.yml
ikostan Dec 15, 2024
ad238d2
Update test_thirt.py
ikostan Dec 15, 2024
33b54c1
Update .codeclimate.yml
ikostan Dec 15, 2024
2c1d6cb
Update .codeclimate.yml
ikostan Dec 15, 2024
042d6b4
Update .codeclimate.yml
ikostan Dec 15, 2024
084e5cb
Update .codeclimate.yml
ikostan Dec 15, 2024
ff90f6d
Update .codeclimate.yml
ikostan Dec 15, 2024
d73f6cb
Update .yamllint.yaml
ikostan Dec 15, 2024
681da82
Update .codeclimate.yml
ikostan Dec 15, 2024
66411da
Update .codeclimate.yml
ikostan Dec 15, 2024
8f7b01c
Update .codeclimate.yml
ikostan Dec 15, 2024
00fa790
Update .codeclimate.yml
ikostan Dec 15, 2024
2c6a6fd
Update .codeclimate.yml
ikostan Dec 15, 2024
d906a18
Update .yamllint.yaml
ikostan Dec 15, 2024
d0738b5
Update .yamllint.yaml
ikostan Dec 15, 2024
bd9e454
Update .yamllint
ikostan Dec 15, 2024
1adfe51
Update .yamllint.yaml
ikostan Dec 15, 2024
94e31f2
Update .codeclimate.yml
ikostan Dec 15, 2024
8b4407f
Update .yamllint.yaml
ikostan Dec 15, 2024
4b5e2a7
Update .yamllint.yaml
ikostan Dec 15, 2024
3f2e559
Update .yamllint.yaml
ikostan Dec 15, 2024
62be92f
Update .yamllint.yaml
ikostan Dec 15, 2024
3440a5a
Update .yamllint.yaml
ikostan Dec 15, 2024
b680cfd
Update .yamllint.yaml
ikostan Dec 15, 2024
f08458f
Update .yamllint.yaml
ikostan Dec 15, 2024
a73848b
Update .codeclimate.yml
ikostan Dec 15, 2024
203a163
Update yamllint.yml
ikostan Dec 15, 2024
4bd70f6
Update .yamllint.yaml
ikostan Dec 15, 2024
513e7da
Update yamllint.yml
ikostan Dec 15, 2024
66ff141
Update .codeclimate.yml
ikostan Dec 15, 2024
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
9 changes: 3 additions & 6 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
version: "2" # required to adjust maintainability checks
version: "2" # required to adjust maintainability checks

checks:
import-error:
Expand All @@ -8,12 +8,9 @@
enabled: false
no-name-in-module:
enabled: false
# Per-Language Mass Threshold Defaults
# https://docs.codeclimate.com/docs/duplication#section-understand-the-engine
similar-code:
config:
threshold: 68 #overriding will affect all languages
threshold: 68
identical-code:
config:

Check warning on line 15 in .codeclimate.yml

View workflow job for this annotation

GitHub Actions / build (3.x)

15:21 [comments] too few spaces before comment

Check warning on line 15 in .codeclimate.yml

View workflow job for this annotation

GitHub Actions / build (3.x)

15:22 [comments] missing starting space in comment
threshold: 32 #overriding will affect all languages
# ... CONFIG CONTENT ...
threshold: 32
10 changes: 3 additions & 7 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@ rules:
brackets: enable
colons: enable
commas: enable
comments:
level: warning
comments-indentation:
level: warning
document-end: disable
document-start:
level: warning
comments: disable
comments-indentation: disable
document-start: disable
empty-lines: enable
empty-values: disable
float-values: disable
Expand Down
49 changes: 22 additions & 27 deletions kyu_6/a_rule_of_divisibility_by_13/test_thirt.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""
Test for -> A Rule of Divisibility by 13
Test for -> A Rule of Divisibility by 13.

Created by Egor Kostan.
GitHub: https://github.com/ikostan
"""
Expand All @@ -8,6 +9,7 @@

import unittest
import allure
from parameterized import parameterized
from kyu_6.a_rule_of_divisibility_by_13.thirt import thirt
from utils.log_func import print_log

Expand All @@ -23,14 +25,21 @@
url='https://www.codewars.com/kata/564057bc348c7200bd0000ff',
name='Source/Kata')
class ThirtTestCase(unittest.TestCase):
"""
Testing 'thirt' function
"""
"""Testing 'thirt' function."""

@parameterized.expand([
(1234567, 87),
(321, 48),
(8529, 79),
(85299258, 31),
(5634, 57),
(1111111111, 71),
(987654321, 30)])
# pylint: disable-msg=R0801
def test_thirt(self):
def test_thirt(self, n, expected):
"""
Testing 'thirt' function with various test data
Testing 'thirt' function with various test data.

:return:
"""
allure.dynamic.title("Testing 'thirt' function")
Expand All @@ -44,26 +53,12 @@ def test_thirt(self):
"on an integer n (>=0). 'thirt' should return the stationary"
" number.</p>")
# pylint: enable-msg=R0801
test_data: tuple = (
(1234567, 87),
(321, 48),
(8529, 79),
(85299258, 31),
(5634, 57),
(1111111111, 71),
(987654321, 30))

for n, expected in test_data:
actual_result = thirt(n)
# pylint: disable-msg=R0801
with allure.step(f"Enter a n ({n}) and verify the "
f"expected output ({expected}) vs "
f"actual result ({actual_result})"):

print_log(n=n,
expected=expected,
result=actual_result)

self.assertEqual(expected,
actual_result)
actual_result = thirt(n)
# pylint: disable-msg=R0801
with allure.step(f"Enter a n ({n}) and verify the "
f"expected output ({expected}) vs "
f"actual result ({actual_result})"):
print_log(n=n, expected=expected, result=actual_result)
self.assertEqual(expected, actual_result)
# pylint: enable-msg=R0801
Loading