feat: 1차 과제 프로젝트 코드 업로드

This commit is contained in:
eglee committed 2026-10-27 11:01:12 +09:00
1 parent 9cee9bf791
commit 9df1bcfc2a
12 files changed
+129 -6

No files matched your search

+10 -2
View File
@@ -80,12 +80,20 @@ class DrawingReconstructionTests(unittest.TestCase):
self.assertNotIn('__DRAWING_SVG__', source)
self.assertNotIn('__VIEWER_JS__', source)
self.assertIn('function drawingRegions()', source)
before_script = source.split('<script')[0]
self.assertGreater(before_script.count('<polygon'), 900)
scene = source.split('id="scene"', 1)[1].split('</svg>', 1)[0]
self.assertGreater(scene.count('<polygon'), 900)
self.assertTrue((out / 'drawing' / r2c.DEFAULT_DXF.name).is_file())
self.assertEqual(json.loads((out / 'model.json').read_text())['sha256'], m['sha256'])
self.assertTrue((out / 'model.obj').read_text().startswith('# R2C'))
def test_file_entry_redirects_to_configured_server_port(self):
with tempfile.TemporaryDirectory() as directory:
r2c.build(output=directory, update_entry=False, port=8080)
source = (Path(directory) / 'index.html').read_text()
self.assertNotIn('__SERVER_PORT__', source)
self.assertIn("if (location.protocol === 'file:')", source)
self.assertIn("location.replace('http://localhost:8080/' + location.search + location.hash)", source)
def test_web_handler_serves_generated_files_only(self):
class Handler(http.server.SimpleHTTPRequestHandler):
def log_message(self, *args):