pynetworktables icon indicating copy to clipboard operation
pynetworktables copied to clipboard

Tests fail using ntcore backend

Open TheTripleV opened this issue 5 years ago • 6 comments

The following tests failed repeatedly on the ntcore backend:

  • test_util.py::test_ntproperty[True] - assert None == 0
  • test_util.py::test_ntproperty[False] - assert None == 0
  • test_util.py::test_ntproperty_multitest[True] - assert None == 0
  • test_util.py::test_ntproperty_multitest[False] - assert None == 0
  • test_util.py::test_chooser_control[True] - AssertionError: assert None...
  • test_util.py::test_chooser_control[False] - AssertionError: assert 'fo...

TheTripleV avatar Jul 21 '20 03:07 TheTripleV

Took a look at this. Looks like we need to change line 20 of tests/conftest.py back to import from networktables, otherwise the utils will use a different backend to the test fixtures.

auscompgeek avatar Jul 23 '20 05:07 auscompgeek

This might also be an indicator that we should actually pass the NetworkTablesInstance to the util classes in the tests as well.

auscompgeek avatar Jul 23 '20 05:07 auscompgeek

Fixed by #115 and #118, but perhaps we should also make it possible to run the tests with the ntcore backend here?

auscompgeek avatar Feb 03 '21 12:02 auscompgeek

This does run tests with ntcore. The only issue is with some tests sporadically failing: https://github.com/robotpy/pynetworktables/actions/runs/498147113. With the current matrix of size 32, jobs get queued making runs long.

TheTripleV avatar Feb 05 '21 07:02 TheTripleV

This does run tests with ntcore.

I believe early 2021 me was referring to the fact that none of the tests here will actually run against the ntcore backend, as the fixtures unconditionally use the pure-Python backend. Whilst I might agree that it's good to test that the pure-Python stuff still works with pyntcore installed, I'm not sure it's a good use of our CI time.

auscompgeek avatar Dec 28 '21 13:12 auscompgeek

The reason for adding this testing was because team code written in pure python started failing when swapped to the pyntcore back end. I guess with nt4 coming in 2023, it doesn't really matter all too much anymore.

TheTripleV avatar Dec 28 '21 18:12 TheTripleV