matthew-brett / grin

A grep program configured the way I like it.
Other
9 stars 2 forks source link

Replace nose with nose3 #4

Closed tjni closed 1 year ago

tjni commented 1 year ago

nose3 is a port of nose that is more actively maintained. It says it does not support Python 3.11, but it is enough and the simplest way to get the tests running on Python 3.11. Otherwise, we will encounter the following error:

======================================================================
ERROR: <nose.suite.ContextSuite context=test_file_recognizer>
test suite for <module 'test_file_recognizer' from '/build/source/tests/test_file_recognizer.py'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/nix/store/2cvn5s3phk0d4la2sl8lw25z7rlisa42-python3.11-nose-1.3.7/lib/python3.11/site-packages/nose/suite.py", line 209, in run
    self.setUp()
  File "/nix/store/2cvn5s3phk0d4la2sl8lw25z7rlisa42-python3.11-nose-1.3.7/lib/python3.11/site-packages/nose/suite.py", line 292, in setUp
    self.setupContext(ancestor)
  File "/nix/store/2cvn5s3phk0d4la2sl8lw25z7rlisa42-python3.11-nose-1.3.7/lib/python3.11/site-packages/nose/suite.py", line 315, in setupContext
    try_run(context, names)
  File "/nix/store/2cvn5s3phk0d4la2sl8lw25z7rlisa42-python3.11-nose-1.3.7/lib/python3.11/site-packages/nose/util.py", line 453, in try_run
    inspect.getargspec(func)
    ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'

----------------------------------------------------------------------
Ran 0 tests in 0.015s
matthew-brett commented 1 year ago

That's reasonable - I'll add some Github actions testing in the meantime.