Skip to content

ExternalParameters inside setup blocks not working #395

@lola831

Description

@lola831

System Details

  1. Python 3.11.11
  2. Scenic main branch
  3. macOS 15.6.1 (MacBook Air M1)

Detailed Description

Adding a test for external parameters declared inside a setup block causes an AssertionError in checkVeneerIsInactive().
This was added to tests/syntax/test_verifai_samplers.py and uses compileScenic, which calls checkVeneerIsInactive().

Observed error:

>       assert not veneer._globalParameters
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       AssertionError

tests/utils.py:262: AssertionError

Steps To Reproduce

# tests/syntax/test_verifai_samplers.py

def test_external_params_in_setup_block():
    scenario = compileScenic(
        """
        from scenic.core.external_params import ExternalParameter

        scenario Main():
            setup:
                param externalSampler = 0
                # A = ExternalParameter()
                # B = ExternalParameter()
                A, B = 0, 0
        """,
        scenario="Main",
    )

Issue Submission Checklist

  • I am reporting an issue, not asking a question
  • I checked the open and closed issues, forum, etc. and have not found any solution
  • I have provided all necessary code, etc. to reproduce the issue

Metadata

Metadata

Assignees

Labels

status: triageIssue needs to be assessedtype: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions