1
0
Fork 0
mirror of https://git.sr.ht/~kivikakk/niar synced 2024-12-23 03:42:24 +00:00
niar/tests/test_cli.py

26 lines
566 B
Python
Raw Normal View History

2024-07-01 19:29:36 +00:00
import pytest
from argparse import ArgumentParser
from amaranth import Elaboratable, Module
from amaranth_boards.icebreaker import ICEBreakerPlatform
from niar import Project, build, logging
class FixtureTop(Elaboratable):
def elaborate(self, platform):
return Module()
class FixtureProject(Project):
name = "fixture"
top = FixtureTop
targets = [ICEBreakerPlatform]
def test_build_works():
parser = ArgumentParser()
build.add_arguments(FixtureProject(), parser)
args, _argv = parser.parse_known_args()
args.func(args)