1
0
Fork 0
mirror of https://git.sr.ht/~kivikakk/niar synced 2024-12-22 21:42:25 +00:00
niar/tests/test_cli.py
2024-07-01 22:29:36 +03:00

26 lines
566 B
Python

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)