summaryrefslogtreecommitdiff
path: root/test/base/test_dependency.py
Commit message (Collapse)AuthorAgeFilesLines
* Try running pyupgrade on the codeFederico Caselli2022-11-161-58/+58
| | | | | | | | command run is "pyupgrade --py37-plus --keep-runtime-typing --keep-percent-format <files...>" pyupgrade will change assert_ to assertTrue. That was reverted since assertTrue does not exists in sqlalchemy fixtures Change-Id: Ie1ed2675c7b11d893d78e028aad0d1576baebb55
* Send deterministic ordering into unit of work topologicalMike Bayer2020-12-111-3/+1
| | | | | | | | | | | | | | | | Improved the unit of work topological sorting system such that the toplogical sort is now deterministic based on the sorting of the input set, which itself is now sorted at the level of mappers, so that the same inputs of affected mappers should produce the same output every time, among mappers / tables that don't have any dependency on each other. This further reduces the chance of deadlocks as can be observed in a flush that UPDATEs among multiple, unrelated tables such that row locks are generated. topological.sort() has been made "deterministic" in all cases by using a separate list + set. Fixes: #5735 Change-Id: I073103df414dba549e46605b394f8ccae6e80d0e
* Post black reformattingMike Bayer2019-01-061-3/+4
| | | | | | | | | | | | | Applied on top of a pure run of black -l 79 in I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9, this set of changes resolves all remaining flake8 conditions for those codes we have enabled in setup.cfg. Included are resolutions for all remaining flake8 issues including shadowed builtins, long lines, import order, unused imports, duplicate imports, and docstring issues. Change-Id: I4f72d3ba1380dd601610ff80b8fb06a2aff8b0fe
* Run black -l 79 against all source filesMike Bayer2019-01-061-148/+209
| | | | | | | | | | | | | | This is a straight reformat run using black as is, with no edits applied at all. The black run will format code consistently, however in some cases that are prevalent in SQLAlchemy code it produces too-long lines. The too-long lines will be resolved in the following commit that will resolve all remaining flake8 issues including shadowed builtins, long lines, import order, unused imports, duplicate imports, and docstring issues. Change-Id: I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9
* Make all tests to be PEP8 compliantKhairi Hafsham2017-02-071-13/+15
| | | | | | | | tested using pycodestyle version 2.2.0 Fixes: #3885 Change-Id: I5df43adc3aefe318f9eeab72a078247a548ec566 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/343
* unit-test deterministic topological sortSebastian Bank2015-03-071-0/+29
|
* - the raw 2to3 runMike Bayer2013-04-271-3/+3
| | | | - went through examples/ and cleaned out excess list() calls
* trying different approaches to test layout. in this one, the testing modulesMike Bayer2012-09-271-3/+3
| | | | | | | become an externally usable package but still remains within the main sqlalchemy parent package. in this system, we use kind of an ugly hack to get the noseplugin imported outside of the "sqlalchemy" package, while still making it available within sqlalchemy for usage by third party libraries.
* -whitespace bonanza, contdMike Bayer2012-07-281-11/+11
|
* - Fixed bug in unit of work whereby detection ofMike Bayer2011-09-221-2/+28
| | | | | | | | | | "cycles" among classes in highly interlinked patterns would not produce a deterministic result; thereby sometimes missing some nodes that should be considered cycles and causing further issues down the road. Note this bug is in 0.6 also; not backported at the moment. [ticket:2282]
* - remove test.sql._base, test.engine._base, test.orm._base, move those ↵Mike Bayer2011-03-271-2/+2
| | | | | | | classes to a new test.lib.fixtures module - move testing.TestBase to test.lib.fixtures - massive search and replace
* Removing unused symbol importTaavi Burns2011-03-151-1/+1
|
* - move topological, queue into utilMike Bayer2010-12-051-2/+1
| | | | | - move function_named into test.lib.util - use @decorator for all decorators in test/
* - sqlalchemy.test and nose plugin moves back to being entirelyMike Bayer2010-11-281-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | outside of "sqlalchemy" and under "test/". Rationale: - coverage plugin works without issue, without need for an awkward additional package install - command line for "nosetests" isn't polluted with SQLAlchemy options [ticket:1949]
| * - move sqlalchemy.test to test.libMike Bayer2010-11-151-2/+2
| |
* | - propagate flag on event.listen() results in the listener being placedMike Bayer2010-11-071-7/+2
|/ | | | | | | | | | | in a separate collection. this collection also propagates during update() - ClassManager now handles bases, subclasses collections. - ClassManager looks at __bases__ instead of __mro__ for superclasses. It's assumed ClassManagers are in an unbroken chain upwards through __mro__. - trying to get a clear() that makes sense on cls.dispatch - implemented propagate for attribute events, plus permutation-based test - implemented propagate for mapper / instance events with rudimentary test - some pool events tests are failing for some reason
* - CircularDependencyError now has .cycles and .edgesMike Bayer2010-09-291-6/+17
| | | | | | members, which are the set of elements involved in one or more cycles, and the set of edges as 2-tuples. [ticket:1890]
* tidy test/base, test/ex, test/extMike Bayer2010-07-111-104/+93
|
* dont use collections on 2.4Mike Bayer2010-04-141-3/+2
|
* breakthrough, wowMike Bayer2010-04-051-4/+4
|
* - further reduce what topological has to do, expects full list of nodesMike Bayer2010-04-041-16/+25
| | | | | - fix some side-effect-dependent behaviors in uow. we can now unconditionally remove "disabled" actions without rewriting
* really got topological going. now that we aren't putting fricking mapped ↵Mike Bayer2010-03-311-10/+126
| | | | | | objects into it all that id() stuff can go
* This is turning out to be a rewrite of the accounting system of ↵Mike Bayer2010-03-301-30/+24
| | | | | | | unitofwork.py, but the overarching method of doing things stays the same. it should be easy to add new dependencies between actions and to change the structure of how things are done.
* start sketching ideas for a rewritten unit of work.Mike Bayer2010-03-191-70/+23
| | | | | | | | | | the basic idea is to bring topological back down to the raw function, then the whole UOW constructs itself as very fine grained elements with full dependencies to each other. then a straight execute with a straight sort. the hope is that the mechanism here would be vastly simpler. while the presence of a large number of fine-grained records may be expensive it still is potentially a lot easier to distill into C code, as the uow's structure now consists of data.
* merge 0.6 series to trunk.Mike Bayer2009-08-061-3/+6
|
* - unit tests have been migrated from unittest to nose.Mike Bayer2009-06-101-0/+186
See README.unittests for information on how to run the tests. [ticket:970]