[go: up one dir, main page]

Menu

[19eff1]: / docs / tests.html  Maximize  Restore  History

Download this file

115 lines (92 with data), 5.5 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>ClammingPy doc</title>
<link rel="logo icon" href="./statics/clamming32x32.ico" />
<link rel="stylesheet" href="./Whakerexa-1.0/wexa_statics/css/wexa.css" type="text/css" />
<link rel="stylesheet" href="./Whakerexa-1.0/wexa_statics/css/layout.css" type="text/css" />
<link rel="stylesheet" href="./Whakerexa-1.0/wexa_statics/css/book.css" type="text/css" />
<link rel="stylesheet" href="./Whakerexa-1.0/wexa_statics/css/menu.css" type="text/css" />
<link rel="stylesheet" href="./Whakerexa-1.0/wexa_statics/css/code.css" type="text/css" />
<link rel="stylesheet" href="./statics/clamming.css" type="text/css" />
<script src="./Whakerexa-1.0/wexa_statics/js/wexa.js" type="module"></script>
<script src="./Whakerexa-1.0/wexa_statics/js/whakerpy/request.js" type="text/javascript"></script>
<script src="./Whakerexa-1.0/wexa_statics/js/book.js" type="application/javascript"></script>
<script type="module">
window.Wexa.OnLoadManager.addLoadFunction(() => {
let book = new Book("main-content");
book.fill_table(false);
});
</script>
</head>
<body class="light">
<header>
<a role="button" class="skip" href="#main-content" aria-label="Go to main content">
Go to main content
</a>
<nav>
<ul>
<li>
<button role="menuitem" class="print-off" onclick="AccessibilityManager.switch_contrast_scheme()" aria-label="Change contrast">
<img class="nav-item-img" src="./Whakerexa-1.0/wexa_statics/icons/contrast_switcher.jpg" alt="Contrast" id="img-contrast"/>
</button>
</li>
<li>
<button class="print-off" role="menuitem" onclick="AccessibilityManager.switch_color_scheme()" aria-label="Change theme color" >
<img class="nav-item-img" src="./Whakerexa-1.0/wexa_statics/icons/theme_switcher.png" alt="Theme" id="img-theme"/>
</button>
</li>
</ul>
</nav>
<h1>ClammingPy 2.0</h1>
<p><img class="small-logo" src="./statics/clamming.png" alt="Software logo"/></p>
<p><a class="external-link" href="https://sourceforge.net/projects/clamming/">https://sourceforge.net/projects/clamming/</a></p>
</header>
<nav id="nav-book" class="side-nav">
<h1>ClammingPy 2.0</h1>
<img class="small-logo center" src="./statics/clamming.png" alt=""/>
<p><a class="external-link" href="https://sourceforge.net/projects/clamming/">https://sourceforge.net/projects/clamming/</a></p>
<ul>
<li><a role="button" tabindex="0" href="clamming.html"> &crarr; Prev. Module</a></li>
<li><a role="button" tabindex="0" href="ClamsModules.html"> &uarr; Prev. Class</a></li>
<li><a role="button" tabindex="0" href="index.html"> &#8962; Index</a></li>
<li><a role="button" tabindex="0" aria-disabled="true"> &darr; Next Class</a></li>
<li><a role="button" tabindex="0" aria-disabled="true"> &rdsh; Next Module</a></li>
</ul>
<h2>Table of Contents</h2>
<ul id="toc"></ul>
<hr>
<p><small>Automatically created</small></p><p><small>by <a class="external-link" href="https://clamming.sf.net">ClammingPy</a></small></p>
</nav>
<main id="main-content">
<section id="#tests">
<h1>tests module</h1>
<section id="readme">
<h1>ClammingPy tests</h1>
<h2>Install required dependencies</h2>
<div class="highlight"><pre><span></span><code><span class="o">&gt;</span><span class="n">python</span> <span class="o">-</span><span class="n">m</span> <span class="n">pip</span> <span class="n">install</span> <span class="s2">&quot;.[tests]&quot;</span>
</code></pre></div>
<h2>Launch tests</h2>
<div class="highlight"><pre><span></span><code><span class="o">&gt;</span><span class="n">python</span> <span class="o">-</span><span class="n">m</span> <span class="n">unittest</span> <span class="n">discover</span>
</code></pre></div>
<p>The last printed line should be "OK".</p>
<h2>Analyze tests coverage</h2>
<div class="highlight"><pre><span></span><code><span class="o">&gt;</span><span class="n">coverage</span> <span class="n">run</span> <span class="o">-</span><span class="n">m</span> <span class="n">unittest</span> <span class="n">discover</span>
</code></pre></div>
<p>It creates a .coverage file.
Then, see results in the terminal, and write XML report to tests/coverage.xml with:</p>
<div class="highlight"><pre><span></span><code><span class="o">&gt;</span><span class="n">coverage</span> <span class="n">report</span> <span class="o">-</span><span class="n">m</span>
<span class="o">&gt;</span><span class="n">coverage</span> <span class="n">xml</span>
</code></pre></div>
</section>
<h2>List of classes</h2>
<section class="cards-panel">
</section>
</section> </main>
<footer>
<p class="copyright">Copyright (C) 2023-2025 Brigitte Bigi, CNRS, Laboratoire Parole et Langage, Aix-en-Provence, France</p>
</footer>
</body>
</html>