pyproject.toml 2.4 KB

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