Added test cases.
This commit is contained in:
parent
c90cbe8642
commit
8e98db48c4
6 changed files with 47 additions and 9 deletions
18
test.py
Normal file
18
test.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
import ods2md
|
||||
|
||||
import unittest
|
||||
import os.path
|
||||
import io
|
||||
|
||||
class Test(unittest.TestCase):
|
||||
def perform_test(self, base):
|
||||
output = io.StringIO()
|
||||
ods2md.main(os.path.join('test', base + '.ods'), output)
|
||||
with open(os.path.join('test', base + '.md'), 'r') as f:
|
||||
self.assertMultiLineEqual(f.read(), output.getvalue())
|
||||
|
||||
def test_sample(self):
|
||||
self.perform_test('sample')
|
||||
|
||||
def test_padded(self):
|
||||
self.perform_test('padded')
|
Loading…
Add table
Add a link
Reference in a new issue