Unit tests failing (on a git clone)

julien.baley's Avatar

julien.baley

14 Mar, 2013 11:43 AM

Hello,

I wanted to play with Anki's internals, and wanted to rely on the existing unit tests to check that I'm not breaking anything.
However, after cloning Anki from Github and running nosetests, I get 7 tests failing:

-5 errors due to server refusing the connexion (when testing remote sync) -a LaTeX test assertion that there is only 1 file in the media folder -the absence of aqt.forms module.

Attached is the trace of nosetests.

Best,
Julien

  1. 1 Posted by Soren Bjornstad on 14 Mar, 2013 09:09 PM

    Soren Bjornstad's Avatar

    The AnkiWeb tests only work if there is a copy of AnkiWeb running on your local computer, so there is no need to worry about that.

    For the forms, did you run aqt/tools/build_ui.sh yet?

    Not sure about the LaTeX one, although I think I got that one last time I ran the tests. Damien should be able to clear it up.

  2. 2 Posted by julien.baley on 14 Mar, 2013 09:32 PM

    julien.baley's Avatar

    I hadn't built, and indeed that test passed then.
    Thanks for your answer. I'm not particularly concerned about the failed test, but mostly want to be sure I'm not missing anything before I start changing things!

    Best

  3. Support Staff 3 Posted by Damien Elmes on 14 Mar, 2013 11:00 PM

    Damien Elmes's Avatar

    What is the error on the latex test?

  4. 4 Posted by julien.baley on 14 Mar, 2013 11:06 PM

    julien.baley's Avatar

    Here is the trace (it's also attached to my initial post):

    ======================================================================
    FAIL: tests.test_latex.test_latex
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
        self.test(*self.arg)
      File "/home/julien/projets/incremental/anki/tests/test_latex.py", line
    31, in test_latex
        assert len(os.listdir(d.media.dir())) == 1
    AssertionError

    It's probably normal though, I don't think I've installed LaTeX on that
    computer. I just assumed initially that all the tests should pass on a
    fresh clone.

    Julien

  5. Support Staff 5 Posted by Damien Elmes on 14 Mar, 2013 11:18 PM

    Damien Elmes's Avatar

    It will fail if you have latex but not dvipng.

  6. Damien Elmes closed this discussion on 15 Mar, 2013 09:40 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac