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

MAJOR BUG: test compare doesn't work as expected #57

Closed
kawa-kokosowa opened this issue Jun 4, 2016 · 4 comments
Closed

MAJOR BUG: test compare doesn't work as expected #57

kawa-kokosowa opened this issue Jun 4, 2016 · 4 comments
Labels

Comments

@kawa-kokosowa
Copy link
Owner

Test compare doesn't work as expected, which is my error, I should've read closer that PixelArray.compare uses 1bit masks, thus if you test a GIF which is two frames of two different solid colors, it may say they're exactly alike.

I'll restore the version which @txanatan made.

@ghost
Copy link

ghost commented Jun 4, 2016

Oh wow, I didn't realize it uses 1bit masks. My old method was slow as anything but it's guaranteed to work I guess.

We should really test the compare method...

@kawa-kokosowa
Copy link
Owner Author

kawa-kokosowa commented Jun 5, 2016

I implemented a new method, however, I uncovered a super depressing recent bug in Pygame for OS X, which felt like a steel blade to my heart.

https://bitbucket.org/pygame/pygame/issues/298/bmp-and-png-images-not-loaded-correctly

In summary, I'll open an image, I can test that the color data is wrong, and when I save it it's exactly as I expected when finding the color samplings wrong. Again, if pygame opens an image, the color data is super messed, and you can test such with get_at() and by saving said image.

I'll have to develop on another... operating system... until these issues are resolved. :(

@kawa-kokosowa
Copy link
Owner Author

Okay so this occurs because of the difference in pygame being tested with py.test and our tests in tests/. Namely, that pygame never actually initializes or anything like that in the tests, and as such, that is the only major difference between files saved in test and files saved in demo.

In summation, pygame bug only in tests, not when pygame actually initialized.

@ghost
Copy link

ghost commented Jun 9, 2016

Is there a way to have an init function that py.test will run before running the tests?

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

No branches or pull requests

1 participant