30 Commits

Author SHA1 Message Date
TVo
f59ad4f39c
Remove cgi deprecation exception from pytest.ini (#15939)
Remove deprecation exception from pytest.ini
2025-04-11 14:07:23 -07:00
Alan Rominger
d3ee9a1bfd
AAP-27502 Try removing coreapi for deprecation warning (#15804)
Try removing coreapi for deprecation warning
2025-04-09 10:50:07 -07:00
TVo
438aa463d5
Remove L10N deprecation exception (#15925)
* Remove L10N deprecation exception

* Remove L10N from default settings file.
2025-04-09 06:22:01 -07:00
Chris Meyers
9ff163b919 Remove AsgiHandler deprecation exception
* Time has passed. Channels (4.2.0) no longer raises a deprecation
  warning for this case. It used to (4.1.0).
* We do NOT serve http requests over daphne, this is the default
  behavior of ProtocolTypeRouter() when the http param is NOT included
2025-03-27 11:40:40 -04:00
Chris Meyers
5d0d0404c7 Remove ProtocolTypeRouter deprecation exception
* Time has passed. Channels (4.2.0) no longer raises a deprecation
  warning for this case. It used to (4.1.0).
* All is good. No code changes needed for this. We do NOT service http
  requests over daphne, just websockets. We, correctly, do NOT supply
  the http key so daphne does NOT service http requests.
2025-03-27 11:17:56 -04:00
Alan Rominger
adc2162bac
Ignore warnings so people can run tests on python 3.12 (#15663) 2024-12-02 11:53:04 -05:00
Alan Rominger
789a43077f Address unclosed fd warnings 2024-11-25 14:01:21 -05:00
Sviatoslav Sydorenko
d8e87da898 🧪 Make pytest notify us about future warnings
In essence, this configures Python to turn any warnings emitted in
runtime into errors[[1]]. This is the best practice that allows
reacting to future deprecation announcements that are coming from the
dependencies (direct, or transitive, or even CPython itself)[[2]].

The typical workflow looks like this:

  1. If a dependency is updated an a warning is hit in tests, the
     deprecated thing should be replaced with newer APIs.

  2. If a dependency is transitive or we have no control over it
     otherwise, the specific warning and a regex matching its message,
     plus the module reference (where possible) can be added to the
     list of temporary ignores in `pytest.ini`.

  3. The list of temporary ignores should be reevaluated periodically,
     including when dependency re-pinning in lockfile is happening.

[1]: https://docs.python.org/3/using/cmdline.html#cmdoption-W
[2]: https://pytest-with-eric.com/configuration/pytest-ignore-warnings/
2024-11-25 14:01:21 -05:00
Sviatoslav Sydorenko (Святослав Сидоренко)
9fbbe3cba0
🧪 Use xunit1 in pytest by default (#15524)
This format is contains file paths unlike the newer implementation.
2024-09-17 09:52:43 -04:00
Seth Foster
53bc88abe2
Fix python_paths error in CI(#14622)
Remove outdated lines from pytest.ini

Was causing KeyError 'python_paths' in CI

Signed-off-by: Seth Foster <fosterbseth@gmail.com>
2023-11-03 09:36:21 -04:00
Alan Rominger
0a13762f11
Use separate module for pytest settings (#13895)
* Use separate module for test settings

* Further refine some pre-existing comments in settings

* Add CACHES to setting snapshot exceptions to accommodate changed load order
2023-04-25 13:31:46 -04:00
Jeff Bradberry
faa12880a9 Squash a few deprecation warnings
- inspect.getargspec() -> inspect.getfullargspec()
- register pytest.mark.fixture_args
- replace use of DRF's deprecated NullBooleanField
- fix some usage of naive datetimes in the tests
- fix some strings with backslashes that ought to be raw strings
2022-03-07 18:11:36 -05:00
Yanis Guenane
e04e4e8c85 Python: Bump to python 3.8 2021-03-24 21:02:32 +01:00
Shane McDonald
6f9862c72e Sweeping replace of old dev venv paths 2020-12-26 21:29:22 -05:00
Shane McDonald
de82c613fc
Make tests pass with current versions of things 2020-06-15 23:13:44 -04:00
Christian Adams
4a0c371014 Fix flaky workflow test & set junit family 2020-03-18 14:02:33 -04:00
beeankha
de34a64115 Basic License feature gating changes 2019-04-12 11:28:27 -04:00
Ryan Petrello
f132ce9b64 switch image builds to py3 2019-01-15 13:25:13 -05:00
Bill Nottingham
9c722cba22 Remove some obsolete code. 2018-02-26 14:55:13 -05:00
AlanCoding
8e6020436c modularization of inventory_import command
This separates file parsing logic that was mixed
in with other important code inside of the
inventory import command.

The logic around MemObject data structures was
moved to utils, and the file parsing was moved
to a legacy module. As of this commit, that
module can operate within the Tower environment
but it will be removed.

Also refactor the loggers to fix old bug and
work inside of the different contexts - the
Loader classes, mem objects, and hopefully
the inventory modules eventually.
2017-05-01 14:37:42 -04:00
Matthew Jones
116e40dbe7 Fix some venv issues related to the new dev env 2016-08-30 14:21:11 -04:00
James Laska
6140c8c500 Additional travis/tox tweaks
* Enable travis caching
* Disable coverage after_build
* Call setup.py develop first
* Include pytest config and enable skipsdist
2016-07-22 13:19:57 -04:00
Chris Meyers
4096583b47 has no one been runnning py.test ? 2016-05-12 09:21:13 -04:00
Akita Noek
7e0bfc9831 Use --nomigrations for py.test
This is for two reasons, 1) it's a lot faster when starting from a new
database, and 2) since we do database work within our migrations, it
doesn't actually work within py.test, which is either a bug in
pytest-djano, or a horrible behavior of pytest-django.
2016-04-12 14:32:10 -04:00
Chris Meyers
bc6eaeb0a9 migrate data from mongo to postgres 2016-03-09 15:25:57 -05:00
Chris Meyers
cfeae51254 deny endpoint access to system tracking feature based on license 2016-03-04 10:14:13 -05:00
Chris Meyers
7ffe46fc74 add postgres Fact model, update views, tests
* awx.main.models Fact added
* view host fact and timeline updated to use new Postgres Fact model instead of Mongo
* Removed license set start Mongo logic
* added View tests
* added Model tests
* Removed mongo fact unit tests
* point at modified jsonbfield that supports sqlite storage driver
* postgresify fact cache receiver
* test OPTIONS endpoint
* Note: single fact view not implemented yet.
2016-02-24 14:38:54 -05:00
Wayne Witzel III
18ea2e0201 default to reuse-db for testing 2016-02-05 21:40:01 -05:00
Wayne Witzel III
6eae492d28 updating commands tests
updating test imports, again

relocate base and make tests a module

added pytest config for awx/lib/site-packages

restrucuting more test imports

more test refactoring

refactoring commands tests
2016-02-01 18:37:56 -05:00
Wayne Witzel III
3d4580611e added pytest to requirements_dev
reworking test strucutre

reworked pytest.ini, removed functional imports, updated req_dev

remove unneeded __init__ files

add testing checker to local_settings examples

adding testing packages to system Python for docker
2016-02-01 18:37:56 -05:00