mirror of
https://github.com/ivabus/pantry
synced 2024-11-29 19:55:06 +03:00
+pytest.org (#140)
* +pytest.org * improve dep versions * shouldn't require pip to use, I believe Co-authored-by: neil <neil@neils-MacBook-Pro.local> Co-authored-by: Jacob Heider <jacob@tea.xyz>
This commit is contained in:
parent
81ada1744b
commit
a70b7a3e05
3 changed files with 38 additions and 0 deletions
26
projects/pytest.org/package.yml
Normal file
26
projects/pytest.org/package.yml
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
distributable:
|
||||||
|
url: https://github.com/pytest-dev/pytest/archive/refs/tags/{{ version }}.tar.gz
|
||||||
|
strip-components: 1
|
||||||
|
|
||||||
|
versions:
|
||||||
|
github: pytest-dev/pytest
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
python.org: '>=3.7'
|
||||||
|
|
||||||
|
|
||||||
|
build:
|
||||||
|
dependencies:
|
||||||
|
pip.pypa.io: '*'
|
||||||
|
script:
|
||||||
|
python-venv.sh {{prefix}}/bin/pytest
|
||||||
|
|
||||||
|
provides:
|
||||||
|
- bin/pytest
|
||||||
|
|
||||||
|
test:
|
||||||
|
script: |
|
||||||
|
pytest --version
|
||||||
|
# Must return true to pass test; we check for the failure response afterwards explicitly.
|
||||||
|
pytest >> test.txt || true
|
||||||
|
cat test.txt | grep "FAILED test_fail.py::test_answer - assert 4 == 5"
|
6
projects/pytest.org/test_fail.py
Normal file
6
projects/pytest.org/test_fail.py
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
def inc(x):
|
||||||
|
return x + 1
|
||||||
|
|
||||||
|
|
||||||
|
def test_answer():
|
||||||
|
assert inc(3) == 5
|
6
projects/pytest.org/test_pass.py
Normal file
6
projects/pytest.org/test_pass.py
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
def inc(x):
|
||||||
|
return x + 1
|
||||||
|
|
||||||
|
|
||||||
|
def test_answer():
|
||||||
|
assert inc(3) == 4
|
Loading…
Reference in a new issue