@@ -320,7 +320,8 @@ def test_article_comma_first(self):
320320 self .assertEqual (res , expected )
321321
322322 def test_article_no_braces (self ):
323- with open ('bibtexparser/tests/data/article_no_braces.bib' , 'r' ) as bibfile :
323+ with open ('bibtexparser/tests/data/article_no_braces.bib' , 'r' ,
324+ encoding = "utf-8" ) as bibfile :
324325 bib = BibTexParser (bibfile .read ())
325326 res = bib .get_entry_list ()
326327 expected = [{'ENTRYTYPE' : 'article' ,
@@ -340,7 +341,8 @@ def test_article_no_braces(self):
340341 self .assertEqual (res , expected )
341342
342343 def test_article_special_characters (self ):
343- with open ('bibtexparser/tests/data/article_with_special_characters.bib' , 'r' ) as bibfile :
344+ with open ('bibtexparser/tests/data/article_with_special_characters.bib' , 'r' ,
345+ encoding = "utf-8" ) as bibfile :
344346 bib = BibTexParser (bibfile .read ())
345347 res = bib .get_entry_list ()
346348 expected = [{'ENTRYTYPE' : 'article' ,
@@ -360,7 +362,8 @@ def test_article_special_characters(self):
360362 self .assertEqual (res , expected )
361363
362364 def test_article_protection_braces (self ):
363- with open ('bibtexparser/tests/data/article_with_protection_braces.bib' , 'r' ) as bibfile :
365+ with open ('bibtexparser/tests/data/article_with_protection_braces.bib' , 'r' ,
366+ encoding = "utf-8" ) as bibfile :
364367 bib = BibTexParser (bibfile .read ())
365368 res = bib .get_entry_list ()
366369 expected = [{'ENTRYTYPE' : 'article' ,
@@ -532,7 +535,8 @@ def test_encoding_with_homogenize(self):
532535 self .assertEqual (res , expected )
533536
534537 def test_field_name_with_dash_underscore (self ):
535- with open ('bibtexparser/tests/data/article_field_name_with_underscore.bib' , 'r' ) as bibfile :
538+ with open ('bibtexparser/tests/data/article_field_name_with_underscore.bib' , 'r' ,
539+ encoding = "utf-8" ) as bibfile :
536540 bib = BibTexParser (bibfile .read ())
537541 res = bib .get_entry_list ()
538542 expected = [{
@@ -552,7 +556,8 @@ def test_field_name_with_dash_underscore(self):
552556 self .assertEqual (res , expected )
553557
554558 def test_string_definitions (self ):
555- with open ('bibtexparser/tests/data/article_with_strings.bib' , 'r' ) as bibfile :
559+ with open ('bibtexparser/tests/data/article_with_strings.bib' , 'r' ,
560+ encoding = "utf-8" ) as bibfile :
556561 bib = BibTexParser (bibfile .read (), common_strings = True )
557562 res = dict (bib .strings )
558563 expected = COMMON_STRINGS .copy ()
@@ -564,7 +569,8 @@ def test_string_definitions(self):
564569 self .assertEqual (res , expected )
565570
566571 def test_string_is_interpolated (self ):
567- with open ('bibtexparser/tests/data/article_with_strings.bib' , 'r' ) as bibfile :
572+ with open ('bibtexparser/tests/data/article_with_strings.bib' , 'r' ,
573+ encoding = "utf-8" ) as bibfile :
568574 bib = BibTexParser (bibfile .read (), common_strings = True ,
569575 interpolate_strings = True )
570576 res = bib .get_entry_list ()
@@ -584,7 +590,8 @@ def test_string_is_interpolated(self):
584590 self .assertEqual (res , expected )
585591
586592 def test_string_is_not_interpolated (self ):
587- with open ('bibtexparser/tests/data/article_with_strings.bib' , 'r' ) as bibfile :
593+ with open ('bibtexparser/tests/data/article_with_strings.bib' , 'r' ,
594+ encoding = "utf-8" ) as bibfile :
588595 bib = BibTexParser (bibfile .read (), common_strings = True ,
589596 interpolate_strings = False )
590597 res = bib .get_entry_list ()[0 ]
0 commit comments