def test_http(httpd_url): """Test with WebTestHttpd and a http:// URL."""
content = load(httpd_url).read() assert content == b"example"
@pytest.fixture(name="temporary_file") def fixture_temporary_file(tmpdir): """Yield a path to a temporary file."""
foobar = tmpdir.join("foobar.txt")
foobar.write("hello world")
yield str(foobar)
foobar.remove()
def test_file_path(temporary_file): """Test loading from a file path.""" assert load(temporary_file).read() == "hello world"
def test_file_url(temporary_file): """Test loading from a file URL.""" assert load("file://%s" % temporary_file).read() == "hello world"
if __name__ == "__main__":
mozunit.main()
Messung V0.5
¤ Dauer der Verarbeitung: 0.15 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.