Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
Z
Zero
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 0
    • Merge Requests 0
  • Requirements
    • Requirements
    • List
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Sean Leavey
  • Zero
  • Issues
  • #36

Closed
Open
Created Nov 21, 2018 by Sean Leavey@sean-leaveyMaintainer

Test for empty input

Test for empty LISO files / empty parsed string. Right now the error message is "input node(s) must be specified", which is not helpful or indicative of the problem. This is because the parser's circuit builder first adds the input component, which needs nodes to be defined via uinput or iinput. The presence of these commands is only checked later, when the circuit is being validated.

Solution might be to store parsed stuff in a dict, and check if this is empty, rather than using class properties - but that's a lot of work.

Example test case:

class InvalidFileTestCase(LisoInputParserTestCase):
    """Voltage output command tests"""
    def test_empty_string(self):
        """Test empty file"""
        self.parser.parse("")
        self.assertRaisesRegex(LisoParserError,
                               r"no circuit defined",
                               self.parser.solution)
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None