Skip to content

Automated tests #8

@vvoovv

Description

@vvoovv

Due to complexity of the PML grammar it's desirable to introduce automated tests.

A PML grammar and translated output can be defined right in the test file.

input = """
facade[item.front and style.count<=1] {
  class: facade_with_door;
}
"""

output = """
Facade(
  condition = lambda item : item.front and self.count <= 1,
  cl = "facade_with_door"
)
"""

And the related test

def test_output():
  assert input == output

The problem I see is that the output is too sensitive to white spaces. An additional space character introduced by the translator would invalidate all automated tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions