-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some more tests. Bump version to 1.2.
---------------- real 0m0.326s user 0m0.275s sys 0m0.035s
- Loading branch information
Showing
6 changed files
with
47 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,14 @@ | |
long_description = """Makechr is a tool for generating NES graphics from pixel art images. It creates the NES graphical components as separate files, letting you easily include these are binaries into homebrew ROMs. There are many options for handling different types of input images, check the README for more information.""" | ||
|
||
setup(name='Makechr', | ||
version='1.1', | ||
version='1.2', | ||
description='Makechr tool for generating NES graphics', | ||
long_description=long_description, | ||
author='Dustin Long', | ||
author_email='[email protected]', | ||
scripts=['bin/makechr'], | ||
url='http://dustmop.io/software/makechr', | ||
download_url='https://github.com/dustmop/makechr/tarball/1.1', | ||
download_url='https://github.com/dustmop/makechr/tarball/1.2', | ||
license='GPL3', | ||
packages=['makechr'], | ||
keywords='NES graphics gamedev', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import unittest | ||
|
||
from PIL import Image | ||
|
||
import context | ||
from makechr import extract_indexed_image_palette, image_processor | ||
|
||
|
||
class ExtractIndexedImagePaletteTests(unittest.TestCase): | ||
def test_extract(self): | ||
"""Extract a palette from a 16-color indexed image.""" | ||
img = Image.open('testdata/full-image-16color.png') | ||
processor = image_processor.ImageProcessor() | ||
extractor = extract_indexed_image_palette.ExtractIndexedImagePalette( | ||
processor) | ||
pal = extractor.extract_palette(img.palette, img.format) | ||
self.assertEqual(str(pal), | ||
'P/16-30-01-0f/16-30-01-38/16-30-19-28/16-23-23-28/') | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.