Code Monkey home page Code Monkey logo

Comments (11)

mscuthbert avatar mscuthbert commented on July 23, 2024

It's at http://web.mit.edu/music21/doc/developerReference/usingGit.html?highlight=multiprocesstest at the bottom. I will separate this out to another document since people not using Eclipse will miss it. It doesn't belong in the top level README file since we have about 50 people using the system for everyone developing it. (regrettably).

from music21.

maxalbert avatar maxalbert commented on July 23, 2024

Ah thanks, I missed that. Yes, I agree it would be good to separate it out and place it somewhere more prominent (when I searched for "test" in the Developer Reference section there was no match). I can see that the toplevel README file is not the right place for this kind of information, but it could be a good idea to add another README file in music21/test because just from looking in that directory it's not obvious which file is the main test file to run (for example, I personally would never have thought of running multiprocessTest.py). I wasn't even sure whether it's the correct directory to look at because when I grepped for "test" in the code base it also returned a lot of matches in the regular code files, so I thought that perhaps running "py.test" from the toplevel directory would be enough (and indeed it returns 172 passed tests, but multiprocessTest.py appears to run some additional ones).

from music21.

mscuthbert avatar mscuthbert commented on July 23, 2024

Max -- it's probably not so high priority any more now that TravisCI will flag any pull requests with problems and point to the test program.

from music21.

maxalbert avatar maxalbert commented on July 23, 2024

Fair enough. It's still nice to be able to run the tests locally, though, and I guess a brief entry in a README file would be sufficient so that someone looking for this information can discover it. It's just that there is a variety of testing frameworks out there, and almost every open source project seems to apply its own little twist to them so it's helpful to know what the correct incantation is to run the tests without having to guess.

from music21.

mscuthbert avatar mscuthbert commented on July 23, 2024

Okay, I'll keep it as a to-do to improve the developer docs for that or happy to take a pull request.

from music21.

shimpe avatar shimpe commented on July 23, 2024

does running a test locally always imply one needs to install first? or is there some clever PYTHONPATH manipulation or other trick that will allow testing the local changes without installing?

from music21.

mscuthbert avatar mscuthbert commented on July 23, 2024

No you definitely can't run tests without an installation. But making local changes to an installed version will definitely be reflected in the tests -- a new commit and installation is not required. Run test/multiprocessTest.py to check first (and if you're used to Py2 only, run it on Py3 and vice-versa) then if that looks good you can run test/singleCoreAll.py (5x slower) or by that point go ahead and make a pull request.

from music21.

mscuthbert avatar mscuthbert commented on July 23, 2024

Thanks to this thread, at least there's some info on test running. :-)

from music21.

japrogramer avatar japrogramer commented on July 23, 2024

This two commands work for me

python -c 'from music21.test.testSingleCoreAll import travisMain as tm; tm()'
python -m unittest -vvv music21.converter.subConverters.Test.testXMLtoPNGtooLong

from music21.

mscuthbert avatar mscuthbert commented on July 23, 2024

http://web.mit.edu/music21/doc/developerReference/testing.html

from music21.

pconerly avatar pconerly commented on July 23, 2024

@mscuthbert Maybe using a Makefile would be a good way to explicitly reference the test command? One of the first things I and many developers do in a repo is look for a Makefile for run/build/test commands.

from music21.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.