sophieball / toxicity-detector

MIT License
0 stars 0 forks source link

Added some tests #23

Closed sophieball closed 4 years ago

sophieball commented 4 years ago

I've created a main_test.py that can call all individual tests.

CaptainEmerson commented 4 years ago
Executing tests from //tests:main_test
-----------------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/google/home/emersonm/.cache/bazel/_bazel_emersonm/944306df6cbfee92be3237efb3eb9146/sandbox/linux-sandbox/1/execroot/__main__/bazel-out/k8-fastbuild/bin/tests/main_test.runfiles/deps_pypi__Markdown_3_2_2/markdown/util.py", line 31, in <module>
    from importlib import metadata
ImportError: cannot import name 'metadata' from 'importlib' (/usr/lib/python3.7/importlib/__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/google/home/emersonm/.cache/bazel/_bazel_emersonm/944306df6cbfee92be3237efb3eb9146/sandbox/linux-sandbox/1/execroot/__main__/bazel-out/k8-fastbuild/bin/tests/main_test.runfiles/__main__/tests/main_test.py", line 5, in <module>
    import test_create_features
  File "/usr/local/google/home/emersonm/toxicity-detector/tests/test_create_features.py", line 7, in <module>
    from src import text_parser
  File "/usr/local/google/home/emersonm/.cache/bazel/_bazel_emersonm/944306df6cbfee92be3237efb3eb9146/sandbox/linux-sandbox/1/execroot/__main__/bazel-out/k8-fastbuild/bin/tests/main_test.runfiles/__main__/src/text_parser.py", line 5, in <module>
    import markdown
  File "/usr/local/google/home/emersonm/.cache/bazel/_bazel_emersonm/944306df6cbfee92be3237efb3eb9146/sandbox/linux-sandbox/1/execroot/__main__/bazel-out/k8-fastbuild/bin/tests/main_test.runfiles/deps_pypi__Markdown_3_2_2/markdown/__init__.py", line 29, in <module>
    from .core import Markdown, markdown, markdownFromFile  # noqa: E402
  File "/usr/local/google/home/emersonm/.cache/bazel/_bazel_emersonm/944306df6cbfee92be3237efb3eb9146/sandbox/linux-sandbox/1/execroot/__main__/bazel-out/k8-fastbuild/bin/tests/main_test.runfiles/deps_pypi__Markdown_3_2_2/markdown/core.py", line 26, in <module>
    from . import util
  File "/usr/local/google/home/emersonm/.cache/bazel/_bazel_emersonm/944306df6cbfee92be3237efb3eb9146/sandbox/linux-sandbox/1/execroot/__main__/bazel-out/k8-fastbuild/bin/tests/main_test.runfiles/deps_pypi__Markdown_3_2_2/markdown/util.py", line 34, in <module>
    import importlib_metadata as metadata
ModuleNotFoundError: No module named 'importlib_metadata'
CaptainEmerson commented 4 years ago
Traceback (most recent call last):
  File "/usr/local/google/home/emersonm/.cache/bazel/_bazel_emersonm/944306df6cbfee92be3237efb3eb9146/sandbox/linux-sandbox/3/execroot/__main__/bazel-out/k8-fastbuild/bin/tests/main_test.runfiles/__main__/tests/main_test.py", line 5, in <module>
    import test_create_features
  File "/usr/local/google/home/emersonm/toxicity-detector/tests/test_create_features.py", line 7, in <module>
    from src import text_parser
  File "/usr/local/google/home/emersonm/.cache/bazel/_bazel_emersonm/944306df6cbfee92be3237efb3eb9146/sandbox/linux-sandbox/3/execroot/__main__/bazel-out/k8-fastbuild/bin/tests/main_test.runfiles/__main__/src/text_parser.py", line 5, in <module>
    import markdown
  File "/usr/local/google/home/emersonm/.cache/bazel/_bazel_emersonm/944306df6cbfee92be3237efb3eb9146/sandbox/linux-sandbox/3/execroot/__main__/bazel-out/k8-fastbuild/bin/tests/main_test.runfiles/deps_pypi__Markdown_3_2_2/markdown/__init__.py", line 29, in <module>
    from .core import Markdown, markdown, markdownFromFile  # noqa: E402
  File "/usr/local/google/home/emersonm/.cache/bazel/_bazel_emersonm/944306df6cbfee92be3237efb3eb9146/sandbox/linux-sandbox/3/execroot/__main__/bazel-out/k8-fastbuild/bin/tests/main_test.runfiles/deps_pypi__Markdown_3_2_2/markdown/core.py", line 26, in <module>
    from . import util
  File "/usr/local/google/home/emersonm/.cache/bazel/_bazel_emersonm/944306df6cbfee92be3237efb3eb9146/sandbox/linux-sandbox/3/execroot/__main__/bazel-out/k8-fastbuild/bin/tests/main_test.runfiles/deps_pypi__Markdown_3_2_2/markdown/util.py", line 34, in <module>
    import importlib_metadata as metadata
  File "/usr/local/google/home/emersonm/.cache/bazel/_bazel_emersonm/944306df6cbfee92be3237efb3eb9146/sandbox/linux-sandbox/3/execroot/__main__/bazel-out/k8-fastbuild/bin/tests/main_test.runfiles/deps_pypi__importlib_metadata_1_6_1/importlib_metadata/__init__.py", line 9, in <module>
    import zipp
ModuleNotFoundError: No module named 'zipp'
CaptainEmerson commented 4 years ago

And ooooooh, looks like maybe Travis is failing for the same reason. Cool.

sophieball commented 4 years ago

Is there a way I can look at /home/travis/.cache/bazel/_bazel_travis/b780598bdbf255f7df0b39f918df3247/execroot/__main__/bazel-out/k8-fastbuild/testlogs/tests/main_test/test.log on travis?

CaptainEmerson commented 4 years ago

I was wondering the same. Maybe https://github.com/travis-ci/travis-ci/issues/7836