Moved test module into root catalog of the project.
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
@@ -1,44 +0,0 @@
|
||||
|
||||
|== INFO ON TEST IMAGES ==|
|
||||
|
||||
Unless stated otherwise, all images come from Wikipedia Commons - http://commons.wikimedia.org
|
||||
For author and license information please refer to their respective description pages.
|
||||
|
||||
All images were scaled down using the GIMP v 2.4.5 since all we care about is the Exif info.
|
||||
Tested before and after scaling to ensure Exif data was not modified (except for 'software' field).
|
||||
|
||||
|
||||
== Filename == == Wiki Filename ==
|
||||
|
||||
= Camera Makes and Models =
|
||||
Canon_40D.jpg Iguana_iguana_male_head.jpg
|
||||
Canon_40D_photoshop_import.jpg Anolis_equestris_-_bright_close_3-4.jpg
|
||||
Canon_DIGITAL_IXUS_400.jpg Ducati749.jpg
|
||||
Fujifilm_FinePix6900ZOOM.jpg Hylidae_cinerea.JPG
|
||||
Fujifilm_FinePix_E500.jpg VlaamseGaaiVeertje1480.JPG
|
||||
Kodak_CX7530.jpg Red-headed_Rock_Agama.jpg
|
||||
Konica_Minolta_DiMAGE_Z3.jpg Knechtova01.jpg
|
||||
Nikon_COOLPIX_P1.jpg Miyagikotsu-castle6861.JPG
|
||||
Nikon_D70.jpg Anolis_carolinensis_brown.jpg
|
||||
Olympus_C8080WZ.jpg Pterois_volitans_Manado-e.jpg
|
||||
Panasonic_DMC-FZ30.jpg Rømø_-_St.Klement_-_Kanzel_3.jpg
|
||||
Pentax_K10D.jpg Mrs._Herbert_Stevens_May_2008.jpg
|
||||
Ricoh_Caplio_RR330.jpg Steveston_dusk.JPG
|
||||
Samsung_Digimax_i50_MP3.jpg Villa_di_Poggio_a_Caiano,_sala_neoclassica_4.JPG
|
||||
Sony_HDR-HC3.jpg Positive_roll_film.jpg
|
||||
WWL_(Polaroid)_ION230.jpg PoudriereBoisSousRoche3.jpg
|
||||
|
||||
= Other Stuff =
|
||||
long_description.jpg US_10th_Mountain_Division_soldiers_in_Afghanistan.jpg
|
||||
|
||||
|
||||
|
||||
Contributions :
|
||||
|
||||
PaintTool_sample.jpg -- Submitted by Jan Trofimov (OXIj)
|
||||
|
||||
|
||||
If you come across an image which is incorrectly parsed or errors out, consider
|
||||
contributing it to the test cases : ianare@gmail.com
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
"""
|
||||
Project: pyGTKtalog
|
||||
Description: Test harvester and runner.
|
||||
Type: exec
|
||||
Author: Roman 'gryf' Dobosz, gryf73@gmail.com
|
||||
Created: 2008-12-15
|
||||
"""
|
||||
import sys
|
||||
import unittest
|
||||
from os import path, chdir
|
||||
import glob
|
||||
|
||||
|
||||
def setup_path():
|
||||
"""Sets up the python include paths to include needed directories"""
|
||||
this_path = path.abspath(path.dirname(__file__))
|
||||
sys.path = [path.join(this_path, "../../src")] + sys.path
|
||||
sys.path = [path.join(this_path, "../../src/test/unit")] + sys.path
|
||||
return
|
||||
|
||||
def build_suite():
|
||||
"""Build suite test from files in unit directory. Filenames with test
|
||||
suites should always end with "_test.py"."""
|
||||
modules = []
|
||||
for fname in glob.glob1('unit', '*_test.py'):
|
||||
class_name = fname[:-8]
|
||||
if "_" in class_name:
|
||||
splited = class_name.split("_")
|
||||
class_name = 'Test'
|
||||
for word in splited:
|
||||
class_name += word.capitalize()
|
||||
else:
|
||||
class_name = "Test" + class_name.capitalize()
|
||||
|
||||
modules.append(fname[:-3])
|
||||
|
||||
modules = map(__import__, modules)
|
||||
load = unittest.defaultTestLoader.loadTestsFromModule
|
||||
return unittest.TestSuite(map(load, modules))
|
||||
|
||||
if __name__ == "__main__":
|
||||
chdir(path.abspath(path.curdir))
|
||||
setup_path()
|
||||
unittest.main(defaultTest="build_suite")
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
"""
|
||||
Project: pyGTKtalog
|
||||
Description: This is simple dummy test for... testing purposes :)
|
||||
Type: test
|
||||
Author: Roman 'gryf' Dobosz, gryf73@gmail.com
|
||||
Created: 2008-12-15
|
||||
"""
|
||||
import unittest
|
||||
|
||||
class TestDummy(unittest.TestCase):
|
||||
"""Fake test class"""
|
||||
def test_dummy_method(self):
|
||||
"""Test simple assertion"""
|
||||
self.assertTrue(True)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -1,17 +0,0 @@
|
||||
"""
|
||||
Project: pyGTKtalog
|
||||
Description: This is another dummy test.
|
||||
Type: test
|
||||
Author: Roman 'gryf' Dobosz, gryf73@gmail.com
|
||||
Created: 2008-12-15
|
||||
"""
|
||||
import unittest
|
||||
|
||||
class TestFooBar(unittest.TestCase):
|
||||
"""Fake test class"""
|
||||
def test_dummy_method(self):
|
||||
"""Test simple assertion"""
|
||||
self.assertTrue(True)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -1,105 +0,0 @@
|
||||
"""
|
||||
Project: pyGTKtalog
|
||||
Description: Tests for Video class.
|
||||
Type: test
|
||||
Author: Roman 'gryf' Dobosz, gryf73@gmail.com
|
||||
Created: 2008-12-15
|
||||
"""
|
||||
import unittest
|
||||
import os
|
||||
from lib.video import Video
|
||||
|
||||
class TestVideo(unittest.TestCase):
|
||||
"""Class for retrive midentify script output and put it in dict.
|
||||
Usually there is no need for such a detailed movie/clip information.
|
||||
Video script belongs to mplayer package.
|
||||
"""
|
||||
|
||||
def test_avi(self):
|
||||
"""test mock avi file, should return dict with expected values"""
|
||||
avi = Video("mocks/m.avi")
|
||||
self.assertTrue(len(avi.tags) != 0, "result should have lenght > 0")
|
||||
self.assertEqual(avi.tags['audio_format'], '85')
|
||||
self.assertEqual(avi.tags['width'], 128)
|
||||
self.assertEqual(avi.tags['audio_no_channels'], 2)
|
||||
self.assertEqual(avi.tags['height'], 96)
|
||||
self.assertEqual(avi.tags['video_format'], 'XVID')
|
||||
self.assertEqual(avi.tags['length'], 4)
|
||||
self.assertEqual(avi.tags['audio_codec'], 'mp3')
|
||||
self.assertEqual(avi.tags['video_codec'], 'ffodivx')
|
||||
self.assertEqual(avi.tags['duration'], '00:00:04')
|
||||
self.assertEqual(avi.tags['container'], 'avi')
|
||||
|
||||
def test_avi2(self):
|
||||
"""test another mock avi file, should return dict with expected
|
||||
values"""
|
||||
avi = Video("mocks/m1.avi")
|
||||
self.assertTrue(len(avi.tags) != 0, "result should have lenght > 0")
|
||||
self.assertEqual(avi.tags['audio_format'], '85')
|
||||
self.assertEqual(avi.tags['width'], 128)
|
||||
self.assertEqual(avi.tags['audio_no_channels'], 2)
|
||||
self.assertEqual(avi.tags['height'], 96)
|
||||
self.assertEqual(avi.tags['video_format'], 'H264')
|
||||
self.assertEqual(avi.tags['length'], 4)
|
||||
self.assertEqual(avi.tags['audio_codec'], 'mp3')
|
||||
self.assertEqual(avi.tags['video_codec'], 'ffh264')
|
||||
self.assertEqual(avi.tags['duration'], '00:00:04')
|
||||
self.assertEqual(avi.tags['container'], 'avi')
|
||||
|
||||
def test_mkv(self):
|
||||
"""test mock mkv file, should return dict with expected values"""
|
||||
avi = Video("mocks/m.mkv")
|
||||
self.assertTrue(len(avi.tags) != 0, "result should have lenght > 0")
|
||||
self.assertEqual(avi.tags['audio_format'], '8192')
|
||||
self.assertEqual(avi.tags['width'], 128)
|
||||
self.assertEqual(avi.tags['audio_no_channels'], 2)
|
||||
self.assertEqual(avi.tags['height'], 96)
|
||||
self.assertEqual(avi.tags['video_format'], 'mp4v')
|
||||
self.assertEqual(avi.tags['length'], 4)
|
||||
self.assertEqual(avi.tags['audio_codec'], 'a52')
|
||||
self.assertEqual(avi.tags['video_codec'], 'ffodivx')
|
||||
self.assertEqual(avi.tags['duration'], '00:00:04')
|
||||
self.assertEqual(avi.tags['container'], 'mkv')
|
||||
|
||||
def test_mpg(self):
|
||||
"""test mock mpg file, should return dict with expected values"""
|
||||
avi = Video("mocks/m.mpg")
|
||||
self.assertTrue(len(avi.tags) != 0, "result should have lenght > 0")
|
||||
self.assertFalse(avi.tags.has_key('audio_format'))
|
||||
self.assertEqual(avi.tags['width'], 128)
|
||||
self.assertFalse(avi.tags.has_key('audio_no_channels'))
|
||||
self.assertEqual(avi.tags['height'], 96)
|
||||
self.assertEqual(avi.tags['video_format'], '0x10000001')
|
||||
self.assertFalse(avi.tags.has_key('lenght'))
|
||||
self.assertFalse(avi.tags.has_key('audio_codec'))
|
||||
self.assertEqual(avi.tags['video_codec'], 'ffmpeg1')
|
||||
self.assertFalse(avi.tags.has_key('duration'))
|
||||
self.assertEqual(avi.tags['container'], 'mpeges')
|
||||
|
||||
def test_ogm(self):
|
||||
"""test mock ogm file, should return dict with expected values"""
|
||||
avi = Video("mocks/m.ogm")
|
||||
self.assertTrue(len(avi.tags) != 0, "result should have lenght > 0")
|
||||
self.assertEqual(avi.tags['audio_format'], '8192')
|
||||
self.assertEqual(avi.tags['width'], 160)
|
||||
self.assertEqual(avi.tags['audio_no_channels'], 2)
|
||||
self.assertEqual(avi.tags['height'], 120)
|
||||
self.assertEqual(avi.tags['video_format'], 'H264')
|
||||
self.assertEqual(avi.tags['length'], 4)
|
||||
self.assertEqual(avi.tags['audio_codec'], 'a52')
|
||||
self.assertEqual(avi.tags['video_codec'], 'ffh264')
|
||||
self.assertEqual(avi.tags['duration'], '00:00:04')
|
||||
self.assertEqual(avi.tags['container'], 'ogg')
|
||||
|
||||
def test_capture(self):
|
||||
"""test capture with some small movie"""
|
||||
avi = Video("mocks/m.avi")
|
||||
filename = avi.capture()
|
||||
self.assertTrue(filename != None)
|
||||
self.assertTrue(os.path.exists(filename))
|
||||
file_size = os.stat(filename)[6]
|
||||
self.assertEqual(file_size, 9077)
|
||||
os.unlink(filename)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||