Mercurial > repos > iuc > pygenometracks
annotate test-data/compare_images.py @ 9:2824d77cd8f8 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/pygenometracks commit d1b394c8e588a78d1b94e3e57922f7ce684ac835"
author | iuc |
---|---|
date | Wed, 18 Nov 2020 21:33:46 +0000 |
parents | 4ac4e7083b7e |
children |
rev | line source |
---|---|
8
4ac4e7083b7e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/pygenometracks commit 3bfe22506f7d9922ac885ef6a6fbe8f96c83ed14"
iuc
parents:
diff
changeset
|
1 import os |
4ac4e7083b7e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/pygenometracks commit 3bfe22506f7d9922ac885ef6a6fbe8f96c83ed14"
iuc
parents:
diff
changeset
|
2 |
4ac4e7083b7e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/pygenometracks commit 3bfe22506f7d9922ac885ef6a6fbe8f96c83ed14"
iuc
parents:
diff
changeset
|
3 from matplotlib.testing.compare import compare_images |
4ac4e7083b7e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/pygenometracks commit 3bfe22506f7d9922ac885ef6a6fbe8f96c83ed14"
iuc
parents:
diff
changeset
|
4 |
4ac4e7083b7e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/pygenometracks commit 3bfe22506f7d9922ac885ef6a6fbe8f96c83ed14"
iuc
parents:
diff
changeset
|
5 pngs = [f for f in os.listdir('test-data') if f.endswith('.png')] |
4ac4e7083b7e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/pygenometracks commit 3bfe22506f7d9922ac885ef6a6fbe8f96c83ed14"
iuc
parents:
diff
changeset
|
6 |
4ac4e7083b7e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/pygenometracks commit 3bfe22506f7d9922ac885ef6a6fbe8f96c83ed14"
iuc
parents:
diff
changeset
|
7 for png in pngs: |
4ac4e7083b7e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/pygenometracks commit 3bfe22506f7d9922ac885ef6a6fbe8f96c83ed14"
iuc
parents:
diff
changeset
|
8 print(png) |
4ac4e7083b7e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/pygenometracks commit 3bfe22506f7d9922ac885ef6a6fbe8f96c83ed14"
iuc
parents:
diff
changeset
|
9 res = compare_images(os.path.join('test-data', png), |
4ac4e7083b7e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/pygenometracks commit 3bfe22506f7d9922ac885ef6a6fbe8f96c83ed14"
iuc
parents:
diff
changeset
|
10 os.path.join('outputs', png), |
4ac4e7083b7e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/pygenometracks commit 3bfe22506f7d9922ac885ef6a6fbe8f96c83ed14"
iuc
parents:
diff
changeset
|
11 17) |
4ac4e7083b7e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/pygenometracks commit 3bfe22506f7d9922ac885ef6a6fbe8f96c83ed14"
iuc
parents:
diff
changeset
|
12 print(res) |