"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/test_instance_config.py" between
flask-1.1.1.tar.gz and flask-1.1.2.tar.gz

About: Flask is a lightweight Python WSGI web application framework.

test_instance_config.py  (flask-1.1.1):test_instance_config.py  (flask-1.1.2)
skipping to change at line 25 skipping to change at line 25
from flask._compat import PY2 from flask._compat import PY2
def test_explicit_instance_paths(modules_tmpdir): def test_explicit_instance_paths(modules_tmpdir):
with pytest.raises(ValueError) as excinfo: with pytest.raises(ValueError) as excinfo:
flask.Flask(__name__, instance_path="instance") flask.Flask(__name__, instance_path="instance")
assert "must be absolute" in str(excinfo.value) assert "must be absolute" in str(excinfo.value)
app = flask.Flask(__name__, instance_path=str(modules_tmpdir)) app = flask.Flask(__name__, instance_path=str(modules_tmpdir))
assert app.instance_path == str(modules_tmpdir) assert app.instance_path == str(modules_tmpdir)
@pytest.mark.xfail(reason="TODO: weird interaction with tox")
def test_main_module_paths(modules_tmpdir, purge_module): def test_main_module_paths(modules_tmpdir, purge_module):
app = modules_tmpdir.join("main_app.py") app = modules_tmpdir.join("main_app.py")
app.write('import flask\n\napp = flask.Flask("__main__")') app.write('import flask\n\napp = flask.Flask("__main__")')
purge_module("main_app") purge_module("main_app")
from main_app import app from main_app import app
here = os.path.abspath(os.getcwd()) here = os.path.abspath(os.getcwd())
assert app.instance_path == os.path.join(here, "instance") assert app.instance_path == os.path.join(here, "instance")
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)