dimanche 12 février 2017

[Python]Can't make Travis CI work. PATHs problems

Vote count: 0

This is my first time using Travis and "test" in general. I created a few test and now I want to add them to Travis but I'm having trouble with PATHs.

Here is what I have:

sheetmaker/
      html_builder.py
      constants.py
      sheetmaker.py
tests/
      test_html_builder.py
      data/
              test_html_constants.py

I manage to run test_html_builder.py and test are working in my pc. In short this is how I'm importing stuff in test_html_builder.py

sys.path.insert(0, os.path.abspath('..'))
from sheetmaker import html_builder
from data import test_html_constants

This works locally but Travis CI says:

  • from sheetmaker import html_builder
  • ModuleNotFoundError: No module named 'sheetmaker'

What is the right way to import stuff? Here is the github project for more details: github project!

Thanks in advance.

asked just now

Let's block ads! (Why?)



[Python]Can't make Travis CI work. PATHs problems

Aucun commentaire:

Enregistrer un commentaire