Skip to content

Commit

Permalink
adding test to confirm len(model.Layers) is working as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
fraguada committed Jan 8, 2025
1 parent c63d39d commit 1bc3ddf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/python/test_File3dm_LayerTable.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import rhino3dm
import unittest
import os

#objective: to test creating file with layers and reading a file with layers
class TestFile3dmLayerTable(unittest.TestCase):
Expand Down Expand Up @@ -75,6 +76,11 @@ def test_Add(self) -> None:

self.assertEqual(l0.Index, 0)

def test_ReadFileWithLayers(self):
file = rhino3dm.File3dm.Read('../models/file3dm_stuff.3dm')
qtyLayers = len(file.Layers)
self.assertTrue(qtyLayers == 6)

if __name__ == '__main__':
print("running tests")
unittest.main()
Expand Down

0 comments on commit 1bc3ddf

Please sign in to comment.