예제 #1
0
    def test_without_pyxpdf_data(self):
        # making impossible to import pyxpdf_data even if installed
        sys.modules['pyxpdf_data'] = None

        Config.load_file(None)
        with self.assertRaises(XPDFConfigError):
            Config.text_encoding = "GBK"
예제 #2
0
 def tearDown(self):
     Config.reset()
예제 #3
0
 def setUp(self):
     Config.reset()
예제 #4
0
 def test_add_font_file(self):
     # FIXME: add font loading case also
     with self.assertRaises(FileNotFoundError):
         Config.add_font_file('abcd', 'abcd')
예제 #5
0
 def setUp(self):
     Config.reset()
     Config.text_eol = 'unix'
예제 #6
0
 def setUp(self):
     Config.reset()
     Config.text_eol = "unix"
     Config.error_quiet = True