-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
89 lines (83 loc) · 3.3 KB
/
index.html
File metadata and controls
89 lines (83 loc) · 3.3 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>assertpy</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.8.0/css/bulma.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.10/styles/atom-one-light.min.css">
<link rel="icon" href="img/icon/favicon-32.png" sizes="32x32">
<link rel="icon" href="img/icon/favicon-96.png" sizes="96x96">
<link rel="icon" href="img/icon/favicon-128.png" sizes="128x128">
<link rel="icon" href="img/icon/favicon-192.png" sizes="192x192">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto&display=swap">
<style>
body { font-family: 'Roboto', sans-serif; font-size: 15px; }
pre.code { margin: 1em 0; padding: 0; }
pre.code code { display: block; padding: 0.5em; }
</style>
</head>
<body>
<section class="section">
<div class="container">
<div class="columns is-mobile is-centered">
<div class="column is-half">
<img src="img/assertpy.svg" title="assertpy" />
</div>
</div>
<div class="columns is-mobile">
<div class="column">
<p>Simple assertions library for unit testing in Python with a nice fluent API. Supports both Python 2 and 3.</p>
</div>
</div>
<div class="columns is-mobile" style="margin-top:1em;">
<div class="column">
<h1 class="title">Example</h1>
<p>Just import the <code>assert_that</code> function, and away you go...</p>
<pre class="code"><code class="python">from assertpy import assert_that
def test_something():
assert_that(1 + 2).is_equal_to(3)
assert_that('foobar').is_length(6).starts_with('foo').ends_with('bar')
assert_that(['a', 'b', 'c']).contains('a').does_not_contain('x')</code></pre>
<p>Of course, assertpy works best with a python test runner like <a href="http://pytest.org/">pytest</a> (our favorite) or <a href="http://nose.readthedocs.org/">Nose</a>.</p>
</div>
</div>
<div class="columns is-mobile" style="margin-top:1em;">
<div class="column">
<h1 class="title">Install</h1>
<p>The assertpy library is available via <a href="https://pypi.org/project/assertpy/">PyPI</a>.
Just install with:</p>
<pre class="code"><code class="bash">pip install assertpy</code></pre>
<p>Or, if you are a big fan of <a href="https://conda.io/">conda</a> like we are, there is an
<a href="https://github.com/conda-forge/assertpy-feedstock">assertpy-feedstock</a> for
<a href="https://conda-forge.org/">Conda-Forge</a> that you can use:</p>
<pre class="code"><code class="bash">conda install assertpy --channel conda-forge</code></pre>
</div>
</div>
<div class="columns is-mobile is-centered" style="margin-top:2em;">
<div class="column">
<p class="buttons is-centered are-large">
<a href="docs.html">
<button class="button is-danger">
<span class="icon"><i class="fa fa-lg fa-file-text"></i></span>
<span>Docs</span>
</button>
</a>
<a href="https://github.com/assertpy/assertpy">
<button class="button is-light">
<span class="icon"><i class="fa fa-lg fa-github"></i></span>
<span>Code</span>
</button>
</a>
</p>
</div>
</div>
</div>
</section>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.10/highlight.min.js"></script>
<script>
hljs.initHighlightingOnLoad();
</script>
</body>
</html>