|
4 | 4 | <meta charset="utf-8"> |
5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
6 | 6 | <title>assertpy</title> |
7 | | -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.5/css/bulma.min.css"> |
| 7 | +<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.8.0/css/bulma.min.css"> |
8 | 8 | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> |
9 | 9 | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.10/styles/atom-one-light.min.css"> |
10 | 10 | <link rel="icon" href="img/icon/favicon-32.png" sizes="32x32"> |
|
13 | 13 | <link rel="icon" href="img/icon/favicon-192.png" sizes="192x192"> |
14 | 14 | <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto&display=swap"> |
15 | 15 | <style> |
16 | | -body { font-family: 'Roboto', sans-serif; } |
17 | | -pre.code { margin: 1em 0 0 0; padding: 0; } |
| 16 | +body { font-family: 'Roboto', sans-serif; font-size: 15px; } |
| 17 | +pre.code { margin: 1em 0; padding: 0; } |
18 | 18 | pre.code code { display: block; padding: 0.5em; } |
19 | | - |
20 | | -.fork { |
21 | | - display: block; |
22 | | - position: absolute; |
23 | | - width: 200px; |
24 | | - top: 25px; |
25 | | - right: -50px; |
26 | | - left: auto; |
27 | | - text-align: center; |
28 | | - line-height: 50px; |
29 | | - transform: rotate(45deg); |
30 | | - -webkit-transform: rotate(45deg); |
31 | | - box-shadow: 0 0 8px rgba(0, 0, 0, 1); |
32 | | -} |
33 | | - |
34 | | -a.fork-link { |
35 | | - display: block; |
36 | | - background: #222; |
37 | | - color: #ddd; |
38 | | - font-size: 0.9em; |
39 | | - text-decoration: none; |
40 | | - z-index: 2; |
41 | | -} |
42 | | - |
43 | | -a.fork-link:hover { |
44 | | - background-color: #333; |
45 | | - color: #fff; |
46 | | -} |
47 | 19 | </style> |
48 | 20 | </head> |
49 | 21 | <body> |
50 | | -<div class="fork"><a href="https://github.com/assertpy/assertpy" class="fork-link">Fork me on GitHub</a></div> |
51 | | - |
52 | 22 | <section class="section"> |
53 | 23 | <div class="container"> |
54 | 24 | <div class="columns is-mobile is-centered"> |
|
68 | 38 | <h1 class="title">Example</h1> |
69 | 39 | <p>Just import the <code>assert_that</code> function, and away you go...</p> |
70 | 40 | <pre class="code"><code>from assertpy import assert_that |
71 | | - |
72 | | -def test_something(): |
73 | | - assert_that(1 + 2).is_equal_to(3) |
74 | | - assert_that('foobar').is_length(6).starts_with('foo').ends_with('bar') |
75 | | - assert_that(['a', 'b', 'c']).contains('a').does_not_contain('x') |
| 41 | + |
| 42 | + def test_something(): |
| 43 | + assert_that(1 + 2).is_equal_to(3) |
| 44 | + assert_that('foobar').is_length(6).starts_with('foo').ends_with('bar') |
| 45 | + assert_that(['a', 'b', 'c']).contains('a').does_not_contain('x') |
76 | 46 | </code></pre> |
| 47 | +<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> |
| 48 | +</div> |
| 49 | +</div> |
| 50 | + |
| 51 | +<div class="columns is-mobile" style="margin-top:1em;"> |
| 52 | +<div class="column"> |
| 53 | +<h1 class="title">Install</h1> |
| 54 | +<p>The assertpy library is available via <a href="https://pypi.org/project/assertpy/">PyPI</a>. |
| 55 | +Just install with:</p> |
| 56 | +<pre class="code"><code class="bash">pip install assertpy</code></pre> |
| 57 | +<p>Or, if you are a big fan of <a href="https://conda.io/">conda</a> like we are, there is an |
| 58 | +<a href="https://github.com/conda-forge/assertpy-feedstock">assertpy-feedstock</a> for |
| 59 | +<a href="https://conda-forge.org/">Conda-Forge</a> that you can use:</p> |
| 60 | +<pre class="code"><code class="bash">conda install assertpy --channel conda-forge</code></pre> |
77 | 61 | </div> |
78 | 62 | </div> |
79 | 63 |
|
80 | 64 | <div class="columns is-mobile is-centered" style="margin-top:2em;"> |
81 | | -<div class="column has-text-centered"> |
82 | | -<a href="https://github.com/assertpy/assertpy"><i style="color:#000;" class="fa fa-4x fa-github"></i></a> |
| 65 | +<div class="column"> |
| 66 | +<p class="buttons is-centered are-large"> |
| 67 | +<a href="docs.html"> |
| 68 | +<button class="button is-danger"> |
| 69 | + <span class="icon"><i class="fa fa-lg fa-file-text"></i></span> |
| 70 | + <span>Docs</span> |
| 71 | +</button> |
| 72 | +</a> |
| 73 | +<a href="https://github.com/assertpy/assertpy"> |
| 74 | +<button class="button is-light"> |
| 75 | + <span class="icon"><i class="fa fa-lg fa-github"></i></span> |
| 76 | + <span>Code</span> |
| 77 | +</button> |
| 78 | +</a> |
| 79 | +</p> |
83 | 80 | </div> |
84 | 81 | </div> |
85 | 82 |
|
|
0 commit comments