kopia lustrzana https://github.com/snarfed/bridgy-fed
suppress bs4.MarkupResemblesLocatorWarning in WebTest.test_create_author_only_url
``` local/lib/python3.9/site-packages/bs4/__init__.py:435: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup. ```pull/538/head
rodzic
38fbce8714
commit
788da1fe66
|
@ -6,9 +6,11 @@ import random
|
|||
import re
|
||||
import unittest
|
||||
from unittest.mock import ANY, call
|
||||
import warnings
|
||||
|
||||
import arroba.util
|
||||
from arroba.util import datetime_to_tid
|
||||
from bs4 import MarkupResemblesLocatorWarning
|
||||
import dag_cbor.random
|
||||
from flask import g
|
||||
from google.cloud import ndb
|
||||
|
@ -133,6 +135,10 @@ class TestCase(unittest.TestCase, testutil.Asserts):
|
|||
|
||||
self.request_context = app.test_request_context('/')
|
||||
|
||||
# suppress a few warnings
|
||||
# local/lib/python3.9/site-packages/bs4/__init__.py:435: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.
|
||||
warnings.filterwarnings('ignore', category=MarkupResemblesLocatorWarning)
|
||||
|
||||
def tearDown(self):
|
||||
self.app_context.pop()
|
||||
self.ndb_context.__exit__(None, None, None)
|
||||
|
|
Ładowanie…
Reference in New Issue