Commit 0eb0d7947faada0a83ed54a5d35d0a680c9b2b5a

Authored by Christian Herdtweck
Committed by Philippe Lagadec
1 parent 5a6b2e00

unittest: remove file type from test module names and data dirs

Will add excel test code and samples later, no need to have separate
folders for different file types.
tests/msodde_doc/__init__.py renamed to tests/msodde/__init__.py
tests/msodde_doc/test_basic.py renamed to tests/msodde/test_basic.py
... ... @@ -22,25 +22,25 @@ class TestReturnCode(unittest.TestCase):
22 22 """ check that a valid doc file leads to 0 exit status """
23 23 for filename in ('dde-test-from-office2003', 'dde-test-from-office2016',
24 24 'harmless-clean', 'dde-test-from-office2013-utf_16le-korean'):
25   - self.do_test_validity(join(BASE_DIR, 'msodde-doc',
  25 + self.do_test_validity(join(BASE_DIR, 'msodde',
26 26 filename + '.doc'))
27 27  
28 28 def test_valid_docx(self):
29 29 """ check that a valid docx file leads to 0 exit status """
30 30 for filename in 'dde-test', 'harmless-clean':
31   - self.do_test_validity(join(BASE_DIR, 'msodde-doc',
  31 + self.do_test_validity(join(BASE_DIR, 'msodde',
32 32 filename + '.docx'))
33 33  
34 34 def test_valid_docm(self):
35 35 """ check that a valid docm file leads to 0 exit status """
36 36 for filename in 'dde-test', 'harmless-clean':
37   - self.do_test_validity(join(BASE_DIR, 'msodde-doc',
  37 + self.do_test_validity(join(BASE_DIR, 'msodde',
38 38 filename + '.docm'))
39 39  
40 40 def test_invalid_other(self):
41 41 """ check that xml do not work yet """
42 42 for extn in '-2003.xml', '.xml':
43   - self.do_test_validity(join(BASE_DIR, 'msodde-doc',
  43 + self.do_test_validity(join(BASE_DIR, 'msodde',
44 44 'harmless-clean' + extn), True)
45 45  
46 46 def test_invalid_none(self):
... ... @@ -96,7 +96,7 @@ class TestDdeInDoc(unittest.TestCase):
96 96 def test_with_dde(self):
97 97 """ check that dde links appear on stdout """
98 98 with OutputCapture() as capturer:
99   - msodde.main([join(BASE_DIR, 'msodde-doc',
  99 + msodde.main([join(BASE_DIR, 'msodde',
100 100 'dde-test-from-office2003.doc')])
101 101 self.assertNotEqual(len(self.get_dde_from_output(capturer)), 0,
102 102 msg='Found no dde links in output for doc file')
... ... @@ -104,14 +104,14 @@ class TestDdeInDoc(unittest.TestCase):
104 104 def test_no_dde(self):
105 105 """ check that no dde links appear on stdout """
106 106 with OutputCapture() as capturer:
107   - msodde.main([join(BASE_DIR, 'msodde-doc', 'harmless-clean.doc')])
  107 + msodde.main([join(BASE_DIR, 'msodde', 'harmless-clean.doc')])
108 108 self.assertEqual(len(self.get_dde_from_output(capturer)), 0,
109 109 msg='Found dde links in output for doc file')
110 110  
111 111 def test_with_dde_utf16le(self):
112 112 """ check that dde links appear on stdout """
113 113 with OutputCapture() as capturer:
114   - msodde.main([join(BASE_DIR, 'msodde-doc',
  114 + msodde.main([join(BASE_DIR, 'msodde',
115 115 'dde-test-from-office2013-utf_16le-korean.doc')])
116 116 self.assertNotEqual(len(self.get_dde_from_output(capturer)), 0,
117 117 msg='Found no dde links in output for doc file')
... ...
tests/msodde_docx/test_blacklist.py renamed to tests/msodde/test_blacklist.py
tests/msodde_docx/__init__.py deleted
tests/test-data/msodde-doc/dde-test-from-office2003.doc renamed to tests/test-data/msodde/dde-test-from-office2003.doc
No preview for this file type
tests/test-data/msodde-doc/dde-test-from-office2013-utf_16le-korean.doc renamed to tests/test-data/msodde/dde-test-from-office2013-utf_16le-korean.doc
No preview for this file type
tests/test-data/msodde-doc/dde-test-from-office2016.doc renamed to tests/test-data/msodde/dde-test-from-office2016.doc
No preview for this file type
tests/test-data/msodde-doc/dde-test.docm renamed to tests/test-data/msodde/dde-test.docm
No preview for this file type
tests/test-data/msodde-doc/dde-test.docx renamed to tests/test-data/msodde/dde-test.docx
No preview for this file type
tests/test-data/msodde-doc/harmless-clean-2003.xml renamed to tests/test-data/msodde/harmless-clean-2003.xml
tests/test-data/msodde-doc/harmless-clean.doc renamed to tests/test-data/msodde/harmless-clean.doc
No preview for this file type
tests/test-data/msodde-doc/harmless-clean.docm renamed to tests/test-data/msodde/harmless-clean.docm
No preview for this file type
tests/test-data/msodde-doc/harmless-clean.docx renamed to tests/test-data/msodde/harmless-clean.docx
No preview for this file type
tests/test-data/msodde-doc/harmless-clean.xml renamed to tests/test-data/msodde/harmless-clean.xml