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

Add an unit test #26

Closed
TheLastProject opened this issue Oct 7, 2017 · 7 comments
Closed

Add an unit test #26

TheLastProject opened this issue Oct 7, 2017 · 7 comments

Comments

@TheLastProject
Copy link
Member

Pext is a beast which has a WAY too big coupling to the Window class in the Python code. Preferably, the added unit test would come along with a decreased coupling that everything has the Window class, but any useful unit test would be great.

@Enforcer
Copy link

Enforcer commented Oct 7, 2017

Hi, I am table to take a look at this. Is there anything I should know before dealing with this issue?

@TheLastProject
Copy link
Member Author

The main issue is that everything in the main file, https://github.com/Pext/Pext/blob/master/pext/pext.py, is very tangled up with the rather huge Window class at https://github.com/Pext/Pext/blob/master/pext/pext.py#L1689-L2248. You will see functions in every class starting with the word "bind" which is generally where things are coupled to the Window class (either there or the constructor already). So it is likely you'll have to figure out how to decouple some things with the Window class so they can be tested without actually opening a window. This issue is just as much about cleaning the code so it becomes more testable than writing an actual issue test and probably one of the hardest issues (unless you're good at refactoring).

@Enforcer
Copy link

Enforcer commented Oct 7, 2017

I see, I think the task is clear for now. Please assign me to this issue

@TheLastProject
Copy link
Member Author

Unfortunately, I can't seem to assign you because you haven't collaborated before and aren't in a team: https://help.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/. I'm inviting you to an "Hacktoberfest" team to try to work around this weird design, will assign you then.

@TheLastProject
Copy link
Member Author

Okay, assigned :)

@TheLastProject
Copy link
Member Author

Hey, it's been 2 weeks, just poking to ask if you managed to make any progress and what your plan for this is :)

@TheLastProject
Copy link
Member Author

With @ata2001's recent contributions, I consider this issue good to close. Of course, more tests are a great idea, but this is a great start, and we have a test now :)

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

No branches or pull requests

2 participants