Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

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 

9import tsfpga 

10from tsfpga.system_utils import load_python_module 

11from tsfpga.registers.parser import from_toml 

12 

13 

14def test_recreating_register_list_object(tmp_path): 

15 toml_file = tsfpga.TSFPGA_EXAMPLE_MODULES / "artyz7" / "regs_artyz7.toml" 

16 artyz7_regs = from_toml("artyz7", toml_file) 

17 

18 artyz7_regs.create_python_class(tmp_path) 

19 artyz7_recreated = load_python_module(tmp_path / "artyz7.py").Artyz7() 

20 

21 assert repr(artyz7_recreated) == repr(artyz7_regs)