pyproject.toml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. [build-system]
  2. requires = ["setuptools>=40.2.0", "wheel"]
  3. build-backend = "setuptools.build_meta"
  4. [tool.black]
  5. # File filtering is taken care of in pre-commit.
  6. line-length=100
  7. target-version=['py36']
  8. [tool.isort]
  9. profile = "black"
  10. line_length = 100
  11. lines_between_sections = 1
  12. known_first_party = "sentry"
  13. skip = "migrations"
  14. [tool.pytest.ini_options]
  15. # note: When updating the traceback format, make sure to update .github/pytest.json
  16. # We don't use the celery pytest plugin.
  17. addopts = "-ra --tb=short --strict-markers -p no:celery"
  18. # TODO: --import-mode=importlib will become the default soon,
  19. # currently we have a few relative imports that don't work with that.
  20. markers = [
  21. "snuba: mark a test as requiring snuba",
  22. ]
  23. selenium_driver = "chrome"
  24. filterwarnings = [
  25. # Consider all warnings to be errors other than the ignored ones.
  26. "error",
  27. # This is just to prevent pytest from exiting if pytest-xdist isn't installed.
  28. "ignore:Unknown config option.*looponfailroots:pytest.PytestConfigWarning",
  29. # The following warning filters should be kept in sync with
  30. # sentry.utils.pytest.sentry, and sentry.runner.settings.
  31. # TODO(joshuarli): Address these as a prerequisite to testing on Django 2.1.
  32. "ignore::django.utils.deprecation.RemovedInDjango20Warning",
  33. "ignore::django.utils.deprecation.RemovedInDjango21Warning",
  34. # DeprecationWarnings from Python 3.6's sre_parse are just so painful,
  35. # and I haven't found a way to ignore it specifically from a module.
  36. # This one in particular is from the "cookies" packages as depended
  37. # on by an outdated version of responses, and shows up all over tests.
  38. # TODO(joshuarli): Upgrade responses, then revisit this.
  39. # It'll probably show up in other dependencies.
  40. "ignore::DeprecationWarning",
  41. # At writing, the Google Bigtable Emulator relies on deprecated behavior
  42. # internally, this can be removed once a version containing this fix is
  43. # released: https://github.com/googleapis/python-bigtable/pull/246
  44. "ignore:The `channel` argument is deprecated; use `transport` instead.:PendingDeprecationWarning:google.cloud.bigtable*",
  45. # The following warning filters are for pytest only.
  46. # This is so we don't have to wrap most datetime objects in testing code
  47. # with django.utils.timezone.
  48. "ignore:DateTimeField.*naive datetime:RuntimeWarning",
  49. "ignore:.*sentry.digests.backends.dummy.DummyBackend.*:sentry.utils.warnings.UnsupportedBackend",
  50. ]
  51. # This is for people who install pytest-xdist locally,
  52. # and use the -f/--looponfail feature.
  53. looponfailroots = ["src", "tests"]