pytest: Don't use nose like syntax
The tests in test_custom_global_id.py use the old nose specific method
'setup(self)' which isn't supported anymore in Pytest 8+. The tests fail
with this error message without modification.
E pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
E graphene/relay/tests/test_custom_global_id.py::TestIncompleteCustomGlobalID::test_must_define_resolve_global_id is using nose-specific method: `setup(self)`
E To remove this warning, rename it to `setup_method(self)`
E See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
Co-authored-by: Erik Wrede <erikwrede@users.noreply.github.com>
* test [1293]: regression test print schema with InputObjectType with DateTime field with default_value
* chore: clarify test title and assertion
---------
Co-authored-by: Erik Wrede <erikwrede@users.noreply.github.com>
* Corrected enum metaclass to fix pickle.dumps()
* considered case with colliding class names (try to distinguish by file name)
* reverted simple solution back (without attempt to support duplicate Enum class names)
---------
Co-authored-by: sgrekov <sgrekov@lohika.com>
Co-authored-by: Erik Wrede <erikwrede@users.noreply.github.com>
* Changed InputObjectType's default builder-from-dict argument to be `Undefined` instead of `None`, removing ambiguity of undefined optional inputs using dot notation access syntax.
* Move `set_default_input_object_type_to_undefined()` fixture into conftest.py for sharing it between multiple test files.
* Default enum description to "An enumeration."
default to this string, which is used in many tests, is causing
* Use the docstring descriptions of enums when they are present
* Added tests
* chore: add missing newline
* Fix new line
---------
Co-authored-by: Erik Wrede <erikwrede@users.noreply.github.com>
Previously, installing graphene and trying to do `from graphene.test import Client`
as recommended in the docs caused an `ImportError`, as the 'promise' library
is imported but only listed as a requirement in the 'test' section of the setup.py
file.
* Vendor DataLoader from aiodataloader and also move get_event_loop behavior from `__init__` to a property which only gets resolved when actually needed (this will solve PyTest-related to early get_event_loop() issues)
* Added DataLoader's specific tests
* plug `loop` parameter into `self._loop`, so that we still have the ability to pass in a custom event loop, if needed.
Co-authored-by: Erik Wrede <erikwrede2@gmail.com>