pmaupin / pdfrw

pdfrw is a pure Python library that reads and writes PDFs
Other
1.86k stars 272 forks source link

Instructions for running tests don't work #143

Open mjbryant opened 6 years ago

mjbryant commented 6 years ago

Following the instructions for running the tests from the README doesn't run all the tests. It looks like paths are messed up. It'd be nice if the steps to run the tests were either more self-explanatory or more correct.

teto commented 4 years ago

If I try to enable the tests, they don't seem fully python3 compliant either (at least for v0.4):

reading manifest file 'pdfrw.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pdfrw.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
  File "nix_run_setup", line 8, in <module>
    exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
  File "setup.py", line 39, in <module>
    zip_safe=True,
  File "/nix/store/6wihp44ygcykcx1bjc0kly3d4lzx5qj1-python3.7-setuptools-41.2.0/lib/python3.7/site-packages/setuptools-41.2.0-py3.7.egg/setuptools/__init__.py", line 145, in setup
  File "/nix/store/k0igqpz995nmxwf6piyd5jjpcc7gcnyc-python3-3.7.4/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/nix/store/k0igqpz995nmxwf6piyd5jjpcc7gcnyc-python3-3.7.4/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/nix/store/k0igqpz995nmxwf6piyd5jjpcc7gcnyc-python3-3.7.4/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/nix/store/6wihp44ygcykcx1bjc0kly3d4lzx5qj1-python3.7-setuptools-41.2.0/lib/python3.7/site-packages/setuptools-41.2.0-py3.7.egg/setuptools/command/test.py", line 229, in run
  File "/nix/store/6wihp44ygcykcx1bjc0kly3d4lzx5qj1-python3.7-setuptools-41.2.0/lib/python3.7/site-packages/setuptools-41.2.0-py3.7.egg/setuptools/command/test.py", line 251, in run_tests
  File "/nix/store/k0igqpz995nmxwf6piyd5jjpcc7gcnyc-python3-3.7.4/lib/python3.7/unittest/main.py", line 100, in __init__
    self.parseArgs(argv)
  File "/nix/store/k0igqpz995nmxwf6piyd5jjpcc7gcnyc-python3-3.7.4/lib/python3.7/unittest/main.py", line 124, in parseArgs
    self._do_discovery(argv[2:])
  File "/nix/store/k0igqpz995nmxwf6piyd5jjpcc7gcnyc-python3-3.7.4/lib/python3.7/unittest/main.py", line 244, in _do_discovery
    self.createTests(from_discovery=True, Loader=Loader)
  File "/nix/store/k0igqpz995nmxwf6piyd5jjpcc7gcnyc-python3-3.7.4/lib/python3.7/unittest/main.py", line 154, in createTests
    self.test = loader.discover(self.start, self.pattern, self.top)
  File "/nix/store/k0igqpz995nmxwf6piyd5jjpcc7gcnyc-python3-3.7.4/lib/python3.7/unittest/loader.py", line 349, in discover
    tests = list(self._find_tests(start_dir, pattern))
  File "/nix/store/k0igqpz995nmxwf6piyd5jjpcc7gcnyc-python3-3.7.4/lib/python3.7/unittest/loader.py", line 406, in _find_tests
    full_path, pattern, namespace)
  File "/nix/store/k0igqpz995nmxwf6piyd5jjpcc7gcnyc-python3-3.7.4/lib/python3.7/unittest/loader.py", line 483, in _find_test_path
    tests = self.loadTestsFromModule(package, pattern=pattern)
  File "/nix/store/6wihp44ygcykcx1bjc0kly3d4lzx5qj1-python3.7-setuptools-41.2.0/lib/python3.7/site-packages/setuptools-41.2.0-py3.7.egg/setuptools/command/test.py", line 55, in loadTestsFromModule
  File "/nix/store/k0igqpz995nmxwf6piyd5jjpcc7gcnyc-python3-3.7.4/lib/python3.7/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/build/pdfrw-0.4/tests/update_expected.py", line 61
    print src