aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test_swfinterp.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <[email protected]>2014-07-20 00:03:54 +0200
committerPhilipp Hagemeister <[email protected]>2014-07-20 00:03:54 +0200
commite75c24e88907f329c57cf05d729dbf599349bb50 (patch)
tree9a414da9c75e08fbf948a69ebdd5084994160f77 /test/test_swfinterp.py
parent0cb2056304178ae8944e84c5bc72f96102291a12 (diff)
downloadyoutube-dl-e75c24e88907f329c57cf05d729dbf599349bb50.tar.gz
youtube-dl-e75c24e88907f329c57cf05d729dbf599349bb50.zip
[swfinterp] Extend tests and fix parsing
Diffstat (limited to 'test/test_swfinterp.py')
-rw-r--r--test/test_swfinterp.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/test_swfinterp.py b/test/test_swfinterp.py
index 98a14a006..3bb5a6308 100644
--- a/test/test_swfinterp.py
+++ b/test/test_swfinterp.py
@@ -23,10 +23,10 @@ class TestSWFInterpreter(unittest.TestCase):
pass
-for testfile in os.listdir(TEST_DIR):
+def _make_testfunc(testfile):
m = re.match(r'^(.*)\.(as)$', testfile)
if not m:
- continue
+ return
test_id = m.group(1)
def test_func(self):
@@ -36,7 +36,7 @@ for testfile in os.listdir(TEST_DIR):
or os.path.getmtime(swf_file) < os.path.getmtime(as_file)):
# Recompile
try:
- subprocess.check_call(['mxmlc', '--output', swf_file, as_file])
+ subprocess.check_call(['mxmlc', '-output', swf_file, as_file])
except OSError as ose:
if ose.errno == errno.ENOENT:
print('mxmlc not found! Skipping test.')
@@ -69,5 +69,8 @@ for testfile in os.listdir(TEST_DIR):
setattr(TestSWFInterpreter, test_func.__name__, test_func)
+for testfile in os.listdir(TEST_DIR):
+ _make_testfunc(testfile)
+
if __name__ == '__main__':
unittest.main()