Debian Codegraph @

skrf/media/tests/README.rst

raw
1
2 skrf.media tests
3 =================
4
5 Running Tests
6 -----------------
7 These tests are most easily run using pytest, like so ::
8
9 pytest skrf/media/tests/
10
11 Using QUCS for test-cases
12 --------------------------
13
14 skrf's media classes are tested by comparison with those produced by qucs (http://qucs.sourceforge.net/). The directory `qucs_prj/` is a qucs project directory which contains the projects used to generate the various touchstone files that are considered correct. The easiest way to use this project in qucs is to symbolically link to the `qucs_prj` directory in your qucs directory (~/.qucs/ by default). So for example, if you are in this directory ::
15
16 ln -s skrf/media/tests/qucs_prj ~/.qucs/
17
18 Once you simulate the test network in qucs, you can convert the output
19 data into a touchstone file by using `qucsconv`, for example ::
20
21 qucsconv -if qucsdata -i resistor.dat -of touchstone -o resistor,1ohm.s2p
22
23 This touchstone can then be loaded into skrf as a Network, and tests
24 can be run.
25
26
27 Structure of tests
28 -------------------
29
30 The test module `test_all_construction.py` tests that all media classes can call network creation methods that are inherited from the `Media` class.
31
32 In addition to this, each media class should have a separate test module that tests its functionality.