implement basic version

This commit is contained in:
nicolalandro
2021-11-13 14:55:57 +01:00
parent 389cc6b450
commit c914a8f5ed
8 changed files with 306249 additions and 1 deletions

0
test/__init__.py Normal file
View File

306082
test/assets/model.obj Normal file

File diff suppressed because it is too large Load Diff

27
test/test_obj2html.py Normal file
View File

@ -0,0 +1,27 @@
import unittest
from src.obj2html import obj2html
import os
class TestObj2Html(unittest.TestCase):
def setUp(self):
self.model_assets_path = 'test/assets/model.obj'
def test_obj2html_without_output_file_path(self):
string_out = obj2html(self.model_assets_path)
self.assertTrue(isinstance(string_out, str))
def test_obj2html_write_html_file(self):
html_path = '/tmp/index.html'
if os.path.isfile(html_path):
os.remove(html_path)
self.assertFalse(os.path.isfile(html_path))
obj2html(self.model_assets_path, html_path)
self.assertTrue(os.path.isfile(html_path))
os.remove(html_path)
if __name__ == '__main__':
unittest.main()