Python copy.original_encoding() Examples

The following are 9 code examples of copy.original_encoding(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module copy , or try the search function .
Example #1
Source File: test_tree.py    From ServerlessCrawler-VancouverRealState with MIT License 5 votes vote down vote up
def test_copy_preserves_encoding(self):
        soup = BeautifulSoup(b'<p>&nbsp;</p>', 'html.parser')
        encoding = soup.original_encoding
        copy = soup.__copy__()
        self.assertEqual(u"<p> </p>", unicode(copy))
        self.assertEqual(encoding, copy.original_encoding) 
Example #2
Source File: test_tree.py    From ServerlessCrawler-VancouverRealState with MIT License 5 votes vote down vote up
def test_copy_preserves_encoding(self):
        soup = BeautifulSoup(b'<p>&nbsp;</p>', 'html.parser')
        encoding = soup.original_encoding
        copy = soup.__copy__()
        self.assertEqual(u"<p> </p>", unicode(copy))
        self.assertEqual(encoding, copy.original_encoding) 
Example #3
Source File: test_tree.py    From ServerlessCrawler-VancouverRealState with MIT License 5 votes vote down vote up
def test_copy_preserves_encoding(self):
        soup = BeautifulSoup(b'<p>&nbsp;</p>', 'html.parser')
        encoding = soup.original_encoding
        copy = soup.__copy__()
        self.assertEqual(u"<p> </p>", unicode(copy))
        self.assertEqual(encoding, copy.original_encoding) 
Example #4
Source File: test_tree.py    From B.E.N.J.I. with MIT License 5 votes vote down vote up
def test_copy_preserves_encoding(self):
        soup = BeautifulSoup(b'<p>&nbsp;</p>', 'html.parser')
        encoding = soup.original_encoding
        copy = soup.__copy__()
        self.assertEqual("<p> </p>", str(copy))
        self.assertEqual(encoding, copy.original_encoding) 
Example #5
Source File: test_tree.py    From MIA-Dictionary-Addon with GNU General Public License v3.0 5 votes vote down vote up
def test_copy_preserves_encoding(self):
        soup = BeautifulSoup(b'<p>&nbsp;</p>', 'html.parser')
        encoding = soup.original_encoding
        copy = soup.__copy__()
        self.assertEqual("<p> </p>", str(copy))
        self.assertEqual(encoding, copy.original_encoding) 
Example #6
Source File: test_tree.py    From bazarr with GNU General Public License v3.0 5 votes vote down vote up
def test_copy_preserves_encoding(self):
        soup = BeautifulSoup(b'<p>&nbsp;</p>', 'html.parser')
        encoding = soup.original_encoding
        copy = soup.__copy__()
        self.assertEqual(u"<p> </p>", unicode(copy))
        self.assertEqual(encoding, copy.original_encoding) 
Example #7
Source File: test_tree.py    From bazarr with GNU General Public License v3.0 5 votes vote down vote up
def test_copy_preserves_encoding(self):
        soup = BeautifulSoup(b'<p>&nbsp;</p>', 'html.parser')
        encoding = soup.original_encoding
        copy = soup.__copy__()
        self.assertEqual("<p> </p>", str(copy))
        self.assertEqual(encoding, copy.original_encoding) 
Example #8
Source File: test_tree.py    From Tautulli with GNU General Public License v3.0 5 votes vote down vote up
def test_copy_preserves_encoding(self):
        soup = BeautifulSoup(b'<p>&nbsp;</p>', 'html.parser')
        encoding = soup.original_encoding
        copy = soup.__copy__()
        self.assertEqual("<p> </p>", str(copy))
        self.assertEqual(encoding, copy.original_encoding) 
Example #9
Source File: test_tree.py    From V1EngineeringInc-Docs with Creative Commons Attribution Share Alike 4.0 International 5 votes vote down vote up
def test_copy_preserves_encoding(self):
        soup = BeautifulSoup(b'<p>&nbsp;</p>', 'html.parser')
        encoding = soup.original_encoding
        copy = soup.__copy__()
        self.assertEqual("<p> </p>", str(copy))
        self.assertEqual(encoding, copy.original_encoding)