mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
'typoz'
This commit is contained in:
parent
0e7c8dc730
commit
31c5760182
3 changed files with 5 additions and 4 deletions
|
@ -188,8 +188,6 @@ Note that you can pass multiple test names in the above examples::
|
||||||
|
|
||||||
$ py.test test_aliases.py test_environ.py
|
$ py.test test_aliases.py test_environ.py
|
||||||
|
|
||||||
Happy testing!
|
|
||||||
|
|
||||||
----------------------------------
|
----------------------------------
|
||||||
Writing the Tests - Advanced
|
Writing the Tests - Advanced
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
@ -216,7 +214,7 @@ when writting tests it's best to use pytest features i.e parametrization::
|
||||||
...
|
...
|
||||||
|
|
||||||
this will run the test two times each time with the respective `test_env`.
|
this will run the test two times each time with the respective `test_env`.
|
||||||
This can be done with for loop too but the test will run
|
This can be done with a for loop too but the test will run
|
||||||
only once for the different test cases and you get less isolation.
|
only once for the different test cases and you get less isolation.
|
||||||
|
|
||||||
With that in mind, each test should have the least `assert` statements,
|
With that in mind, each test should have the least `assert` statements,
|
||||||
|
@ -224,6 +222,8 @@ preferably one.
|
||||||
|
|
||||||
At the moment, xonsh doesn't support any pytest plugins.
|
At the moment, xonsh doesn't support any pytest plugins.
|
||||||
|
|
||||||
|
Happy Testing!
|
||||||
|
|
||||||
|
|
||||||
How to Document
|
How to Document
|
||||||
====================
|
====================
|
||||||
|
|
|
@ -12,7 +12,7 @@ import builtins
|
||||||
|
|
||||||
@pytest.yield_fixture(autouse=True)
|
@pytest.yield_fixture(autouse=True)
|
||||||
def imp_env(xonsh_execer):
|
def imp_env(xonsh_execer):
|
||||||
"""Call `load_builtins with `xonsh_execer`"""
|
"""Call `load_builtins` with `xonsh_execer`"""
|
||||||
load_builtins(execer=xonsh_execer)
|
load_builtins(execer=xonsh_execer)
|
||||||
builtins.__xonsh_env__ = Env({'PATH': [], 'PATHEXT': []})
|
builtins.__xonsh_env__ = Env({'PATH': [], 'PATHEXT': []})
|
||||||
yield
|
yield
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import pytest
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import prompt_toolkit
|
import prompt_toolkit
|
||||||
|
|
Loading…
Add table
Reference in a new issue