Skip to content

Conversation

@adamserafini
Copy link

There are a couple of problems with the instructions for running tests in the current project README:

  1. pyxl_tests.py was renamed tests\test_basic.py
  2. Since then, many more tests have been added and the README does not address how to run them all as a complete test suite.

It seems the newer tests have a different 'style' to the original pyxl_tests.py: the new tests use pytest-style, ie. plain asserts in functions rather than the unittest2-style consisting of assertEqual etc.

This suggests that the intended way of running the full test suite is with pytest.

This PR does the following:

a. Makes the test suite consistent with itself: changes any use of unittest2 style testing to pytest style testing comprised of asserts in functions and removes any unittest2 dependencies.

b. Adds instructions to the README for running the full test suite.

This commit makes tests/test_basic.py more similar to the other
test files in the test directory. Ie. instead of using unittest,
tests are just asserts in functions that can be run by pytest.
Refactor test_rss.py to be more similar to the other tests,
ie. the tests are asserts in functions.
Running test_errors.py with pytest generates the complaint that
using yield in tests is deprecated. On closer inspection,
test_errors.py can be simplified by embedding a multiline string
with the error case in each test function.
@CLAassistant
Copy link

CLAassistant commented Apr 16, 2022

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants