Coverage for tsfpga/test/unit/test_build_step_tcl_hook.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v6.4, created at 2022-05-28 04:01 +0000

1# -------------------------------------------------------------------------------------------------- 

2# Copyright (c) Lukas Vik. All rights reserved. 

3# 

4# This file is part of the tsfpga project. 

5# https://tsfpga.com 

6# https://gitlab.com/tsfpga/tsfpga 

7# -------------------------------------------------------------------------------------------------- 

8 

9from pathlib import Path 

10 

11from tsfpga.build_step_tcl_hook import BuildStepTclHook 

12 

13 

14def test_step_is_synth(): 

15 assert BuildStepTclHook(Path(), "STEPS.SYNTH_DESIGN.TCL.PRE").step_is_synth 

16 assert not BuildStepTclHook(Path(), "STEPS.ROUTE_DESIGN.TCL.PRE").step_is_synth 

17 

18 

19def test_can_cast_to_string_without_error(): 

20 str(BuildStepTclHook(Path("some_file.tcl"), "STEPS.SYNTH_DESIGN.TCL.PRE"))