test_create_view_helpers
Revit-hosted tests for the view helpers in pyrevit.revit.db.create.
Run from Revit via the pyRevit DevTools "Create View Helpers Tests" button (doc-project context). Every test rolls back its changes.
Attributes
TEST_LEVEL = 'Integration'
module-attribute
TEST_ENVIRONMENT = 'Revit'
module-attribute
TOLERANCE = 1e-06
module-attribute
Classes
RolledBackTestCase
Bases: TestCase
Runs each test inside a transaction that is rolled back.
Methods:
setUp()
Skip family documents and open the transaction.
Source code in pyrevitlib/pyrevit/unittests/test_create_view_helpers.py
CreateSectionViewTests
Bases: RolledBackTestCase
Regression tests for #4017.
Methods:
test_west_to_east_looks_north_and_cuts_on_the_line()
A line drawn west to east cuts on the line and looks north.
test_south_to_north_looks_west_and_cuts_on_the_line()
A line drawn south to north cuts on the line and looks west.
setUp()
Skip family documents and open the transaction.
Source code in pyrevitlib/pyrevit/unittests/test_create_view_helpers.py
CropViewToElementsTests
Bases: RolledBackTestCase
Regression tests for #4022.
Attributes
PADDING = 1.0
class-attribute
instance-attribute
Methods:
test_crop_applies_on_a_view_with_a_scope_box()
The crop box matches the elements even though the view had a scope box.
Source code in pyrevitlib/pyrevit/unittests/test_create_view_helpers.py
setUp()
Skip family documents and open the transaction.
Source code in pyrevitlib/pyrevit/unittests/test_create_view_helpers.py
CreateModel3dViewTests
Bases: RolledBackTestCase
Regression tests for #4023.
Methods:
test_model_elements_leave_out_sheets_and_cameras()
Sheets and cameras have extents far beyond the building.
Source code in pyrevitlib/pyrevit/unittests/test_create_view_helpers.py
test_section_box_hugs_the_model()
The default section box is the model's extents plus padding.
Source code in pyrevitlib/pyrevit/unittests/test_create_view_helpers.py
setUp()
Skip family documents and open the transaction.
Source code in pyrevitlib/pyrevit/unittests/test_create_view_helpers.py
PlaceOnSheetTests
Bases: RolledBackTestCase
Regression tests for #4024.
Methods:
test_a_sheet_is_rejected_as_a_view()
Passing a sheet names it as a sheet instead of blaming the sheet it is on.
Source code in pyrevitlib/pyrevit/unittests/test_create_view_helpers.py
setUp()
Skip family documents and open the transaction.