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 sys 

10import pytest 

11 

12import tsfpga 

13 

14# Do PYTHONPATH insert() instead of append() to prefer any local repo checkout over any pip install 

15PATH_TO_VUNIT = tsfpga.REPO_ROOT.parent / "vunit" 

16sys.path.insert(0, str(PATH_TO_VUNIT.resolve())) 

17 

18 

19@pytest.fixture 

20def fixture_tmp_path(request, tmp_path): 

21 """ 

22 A pytest fixture for usage in unittest.TestCase style test classes which gives 

23 access to a unique temp path for each test case. 

24 """ 

25 # Set class member tmp_path 

26 request.cls.tmp_path = tmp_path