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

101 pep8 violation in the code #102

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Drachenfels
Copy link
Collaborator

Hi there,

This PR does two things:

  1. c9a917a - adds micro test suite that tests button, it detected one or two bugs with the current implementation
  2. d40f8aa - fixes detected errors and makes code somewhat more 'pythonic' that is the way a typical seasoned python programmer would write it (basically I run the code against pylint and black and if either of them complained I fixed that)

To run tests in your local env it's as easy as installing pytest (pip install pytest) and then running in shell pytest -v, output will be something like that:

platform linux -- Python 3.9.5, pytest-8.2.0, pluggy-1.5.0 -- ~/Envs/drachenfels-renpy-NQTR-System/bin/python
cachedir: .pytest_cache
rootdir: ~/Projects/drachenfels/renpy/NQTR-System
collected 12 items                                                                                                                           

tests/test_nqtr_button.py::test_button PASSED                                                                                          [  8%]
tests/test_nqtr_button.py::test_align_not_working_as_expected PASSED                                                                   [ 16%]
tests/test_nqtr_button.py::test_button_aligns_accept_any_param_except_none[0-0-0-0_0] PASSED                                           [ 25%]
tests/test_nqtr_button.py::test_button_aligns_accept_any_param_except_none[1-1-1-1] PASSED                                             [ 33%]
tests/test_nqtr_button.py::test_button_aligns_accept_any_param_except_none[-1--1--1--1] PASSED                                         [ 41%]
tests/test_nqtr_button.py::test_button_aligns_accept_any_param_except_none[1.1-1.2-1.1-1.2] PASSED                                     [ 50%]
tests/test_nqtr_button.py::test_button_aligns_accept_any_param_except_none[-1.1--1.2--1.1--1.2] PASSED                                 [ 58%]
tests/test_nqtr_button.py::test_button_aligns_accept_any_param_except_none[--0-0] PASSED                                               [ 66%]
tests/test_nqtr_button.py::test_button_aligns_accept_any_param_except_none[False-False-0-0] PASSED                                     [ 75%]
tests/test_nqtr_button.py::test_button_aligns_accept_any_param_except_none[None-None-0-0] PASSED                                       [ 83%]
tests/test_nqtr_button.py::test_button_aligns_accept_any_param_except_none[xalign8-yalign8-0-0] PASSED                                 [ 91%]
tests/test_nqtr_button.py::test_button_aligns_accept_any_param_except_none[0-0-0-0_1] PASSED                                           [100%]

@Drachenfels Drachenfels linked an issue May 7, 2024 that may be closed by this pull request
@Drachenfels
Copy link
Collaborator Author

I did not similar check anywhere else because I am not sure if you will be happy with those changes, but if yes, I can do more cleanups and fixes like that.

@BlackRam-oss
Copy link
Collaborator

BlackRam-oss commented May 14, 2024

I did not similar check anywhere else because I am not sure if you will be happy with those changes, but if yes, I can do more cleanups and fixes like that.

Hi, I need to make sure that these changes don't change the logic of the tool, but otherwise it's fine.

If you want to make other changes that you think are necessary, just open another issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pep8 violation in the code
2 participants