Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding python 3 to travis #13

Merged
merged 2 commits into from Feb 20, 2018
Merged

Conversation

sdcooke
Copy link
Contributor

@sdcooke sdcooke commented Feb 20, 2018

No description provided.

@kevinbarabash
Copy link
Contributor

@sdcooke the tests are failing b/c of a missing import:

======================================================================
ERROR: evaluator_test (unittest.loader.ModuleImportFailure)
----------------------------------------------------------------------
ImportError: Failed to import test module: evaluator_test
Traceback (most recent call last):
  File "/opt/python/2.7.14/lib/python2.7/unittest/loader.py", line 254, in _find_tests
    module = self._get_module_from_name(name)
  File "/opt/python/2.7.14/lib/python2.7/unittest/loader.py", line 232, in _get_module_from_name
    __import__(name)
  File "/home/travis/build/Khan/tinyquery/tinyquery/evaluator_test.py", line 11, in <module>
    from tinyquery import context
  File "/home/travis/build/Khan/tinyquery/tinyquery/tinyquery.py", line 7, in <module>
    from tinyquery import compiler
ImportError: cannot import name compiler

The tests are run on travis-ci using the following command:

python -m unittest discover -s tinyquery -p "*_test.py"

I'm not very familiar with running python tests. How are you running the tests locally?

@sdcooke
Copy link
Contributor Author

sdcooke commented Feb 20, 2018

Ah I wasn't using the -s - I'm not surprised that fails, because it is confusing the package with the file. I think you'd have to run the tests without the -s to make this work, I don't think there's another way around it:

python -m unittest discover -p "*_test.py"

@kevinbarabash
Copy link
Contributor

@sdcooke cool, that did the trick.

@kevinbarabash kevinbarabash merged commit f81a416 into alangpierce:master Feb 20, 2018
@csilvers
Copy link
Collaborator

Thanks for taking care of this @kevinbarabash !

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.

None yet

3 participants