Commit Graph

24 Commits

Author SHA1 Message Date
Mike Bayer 1e278de4cc Post black reformatting
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
2019-01-06 18:23:11 -05:00
Mike Bayer 1e1a38e780 Run black -l 79 against all source files
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
2019-01-06 17:34:50 +00:00
Khairi Hafsham 772374735d Make all tests to be PEP8 compliant
tested using pycodestyle version 2.2.0

Fixes: #3885
Change-Id: I5df43adc3aefe318f9eeab72a078247a548ec566
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/343
2017-02-07 11:21:56 -05:00
Sebastian Bank e0d7f52439 unit-test deterministic topological sort 2015-03-07 19:36:41 +01:00
Mike Bayer 4b614b9b35 - the raw 2to3 run
- went through examples/ and cleaned out excess list() calls
2013-04-27 19:53:57 -04:00
Mike Bayer 20cdc64588 trying different approaches to test layout. in this one, the testing modules
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.
2012-09-27 02:37:33 -04:00
Mike Bayer 22ba1c43b7 -whitespace bonanza, contd 2012-07-28 17:05:50 -04:00
Mike Bayer 127c48252e - Fixed bug in unit of work whereby detection of
"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]
2011-09-22 19:21:39 -04:00
Mike Bayer 68a350d462 - remove test.sql._base, test.engine._base, test.orm._base, move those classes to a new test.lib.fixtures module
- move testing.TestBase to test.lib.fixtures
- massive search and replace
2011-03-27 16:27:27 -04:00
Taavi Burns 1b812102a7 Removing unused symbol import 2011-03-15 16:01:58 -04:00
Mike Bayer 1f9029597c - move topological, queue into util
- move function_named into test.lib.util
- use @decorator for all decorators in test/
2010-12-05 12:51:24 -05:00
Mike Bayer 58b2939433 - sqlalchemy.test and nose plugin moves back to being entirely
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]
2010-11-28 14:19:44 -05:00
Mike Bayer e1402efb19 - move sqlalchemy.test to test.lib 2010-11-15 19:37:50 -05:00
Mike Bayer 13fedc23ec - propagate flag on event.listen() results in the listener being placed
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
2010-11-07 12:49:48 -05:00
Mike Bayer e9e221977b - CircularDependencyError now has .cycles and .edges
members, which are the set of elements involved in
one or more cycles, and the set of edges as 2-tuples.
[ticket:1890]
2010-09-29 02:11:38 -04:00
Mike Bayer f2b43da1a8 tidy test/base, test/ex, test/ext 2010-07-11 13:41:38 -04:00
Mike Bayer 74a417a599 dont use collections on 2.4 2010-04-14 18:38:11 -04:00
Mike Bayer 8ee0590270 breakthrough, wow 2010-04-05 18:48:57 -04:00
Mike Bayer 23a49e346b - further reduce what topological has to do, expects full list of nodes
- fix some side-effect-dependent behaviors in uow.  we can now
unconditionally remove "disabled" actions without rewriting
2010-04-04 12:24:01 -04:00
Mike Bayer 03fecba819 really got topological going. now that we aren't putting fricking mapped objects into
it all that id() stuff can go
2010-03-31 15:12:29 -04:00
Mike Bayer b9f1a92493 This is turning out to be a rewrite of the accounting system of 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.
2010-03-30 19:19:41 -04:00
Mike Bayer 62d6bf4cc3 start sketching ideas for a rewritten unit of work.
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.
2010-03-19 16:59:52 -04:00
Mike Bayer 8fc5005dfe merge 0.6 series to trunk. 2009-08-06 21:11:27 +00:00
Mike Bayer 45cec095b4 - unit tests have been migrated from unittest to nose.
See README.unittests for information on how to run
the tests.  [ticket:970]
2009-06-10 21:18:24 +00:00