microsoft / knossos-ksc

Compiler with automatic differentiation
Other
45 stars 10 forks source link

Add conftest.py #929

Closed awf closed 3 years ago

awf commented 3 years ago

To set sys.path for tests

awf commented 3 years ago

Sure, happy to move it down to test. My idea was to say at the top of the project what pytesting we plan to do. Perhaps I should do that with a pytest.ini?

acl33 commented 3 years ago

I think pytest.ini at the root + conftest.py further down might be the way to go - note we already have https://github.com/microsoft/knossos-ksc/blob/master/test/python/conftest.py. I defer to Colin ;).

Does this let us update builds/test/test_pytest.sh ? By removing the requirement to pip install -e ?

cgravill commented 3 years ago

Adding a pytest.ini or adding to pyproject.toml sounds good to me.

cgravill commented 3 years ago

We could change the CI build to test directly but we ought to test the packaged version, with the various gotchas that Python packages introduces. We could put that back separately at a later stage with e.g. Tox/Nox to test multiple environments.

awf commented 3 years ago

OK, all passing with reduced pip installing. @cgravill are you OK with this?

cgravill commented 3 years ago

Yes.

I'll just note we don't have package testing now, so folks who are running/testing via package should probably stop doing that. I suggest posting to daily.