diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-04-26 13:13:13 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-04-26 13:13:13 -0700 |
commit | 1caa7fafbd3c9870e1bf2b2ac623872447fc804e (patch) | |
tree | 509f53bfba7c3bbc6941653b82c7cefcb819247c /test | |
parent | 146fbf6d26a8c4140a47aeb03131fdf81007b9a2 (diff) | |
download | sqlalchemy-pr/85.tar.gz |
Fix many typos throughout the codebasepr/85
Found using: https://github.com/intgr/topy
Diffstat (limited to 'test')
32 files changed, 47 insertions, 47 deletions
diff --git a/test/aaa_profiling/test_memusage.py b/test/aaa_profiling/test_memusage.py index 1b9887333..ab1815e8a 100644 --- a/test/aaa_profiling/test_memusage.py +++ b/test/aaa_profiling/test_memusage.py @@ -527,7 +527,7 @@ class MemUsageTest(EnsureZeroed): sess.delete(a) sess.flush() - # dont need to clear_mappers() + # don't need to clear_mappers() del B del A @@ -594,7 +594,7 @@ class MemUsageTest(EnsureZeroed): sess.delete(a) sess.flush() - # dont need to clear_mappers() + # don't need to clear_mappers() del B del A diff --git a/test/aaa_profiling/test_pool.py b/test/aaa_profiling/test_pool.py index cf41d2684..498c83b1b 100644 --- a/test/aaa_profiling/test_pool.py +++ b/test/aaa_profiling/test_pool.py @@ -15,7 +15,7 @@ class QueuePoolTest(fixtures.TestBase, AssertsExecutionResults): def teardown(self): # the tests leave some fake connections - # around which dont necessarily + # around which don't necessarily # get gc'ed as quickly as we'd like, # on backends like pypy, python3.2 pool_module._refs.clear() diff --git a/test/dialect/mssql/test_query.py b/test/dialect/mssql/test_query.py index 6a12744a7..715eebb84 100644 --- a/test/dialect/mssql/test_query.py +++ b/test/dialect/mssql/test_query.py @@ -248,7 +248,7 @@ class QueryTest(testing.AssertsExecutionResults, fixtures.TestBase): testing.db, lambda: engine.execute(t1.insert()), ExactSQL("INSERT INTO t1 DEFAULT VALUES"), - # we dont have an event for + # we don't have an event for # "SELECT @@IDENTITY" part here. # this will be in 0.8 with #2459 ) diff --git a/test/dialect/postgresql/test_dialect.py b/test/dialect/postgresql/test_dialect.py index 7f22c6a6b..e4b247713 100644 --- a/test/dialect/postgresql/test_dialect.py +++ b/test/dialect/postgresql/test_dialect.py @@ -69,7 +69,7 @@ class MiscTest(fixtures.TestBase, AssertsExecutionResults, AssertsCompiledSQL): startswith(".".join(str(x) for x in v)) # currently not passing with pg 9.3 that does not seem to generate - # any notices here, woudl rather find a way to mock this + # any notices here, would rather find a way to mock this @testing.only_on('postgresql+psycopg2', 'psycopg2-specific feature') def _test_notice_logging(self): log = logging.getLogger('sqlalchemy.dialects.postgresql') diff --git a/test/dialect/postgresql/test_query.py b/test/dialect/postgresql/test_query.py index 82b49d974..064f0c372 100644 --- a/test/dialect/postgresql/test_query.py +++ b/test/dialect/postgresql/test_query.py @@ -148,7 +148,7 @@ class InsertTest(fixtures.TestBase, AssertsExecutionResults): table.insert(inline=True).execute({'data': 'd8'}) - # note that the test framework doesnt capture the "preexecute" + # note that the test framework doesn't capture the "preexecute" # of a seqeuence or default. we just see it in the bind params. self.assert_sql(self.engine, go, [], with_sequences=[ diff --git a/test/dialect/postgresql/test_types.py b/test/dialect/postgresql/test_types.py index 1b3c44d70..b30847bce 100644 --- a/test/dialect/postgresql/test_types.py +++ b/test/dialect/postgresql/test_types.py @@ -374,7 +374,7 @@ class TimezoneTest(fixtures.TestBase): psycopg will return a datetime with a tzinfo attached to it, if postgresql returns it. python then will not let you compare a - datetime with a tzinfo to a datetime that doesnt have one. this + datetime with a tzinfo to a datetime that doesn't have one. this test illustrates two ways to have datetime types with and without timezone info. """ diff --git a/test/engine/test_execute.py b/test/engine/test_execute.py index 7c0ccad97..78ae40460 100644 --- a/test/engine/test_execute.py +++ b/test/engine/test_execute.py @@ -282,7 +282,7 @@ class ExecuteTest(fixtures.TestBase): self._test_stmt_exception_pickleable(Exception("hello world")) @testing.crashes("postgresql+psycopg2", - "Older versions dont support cursor pickling, newer ones do") + "Older versions don't support cursor pickling, newer ones do") @testing.fails_on("mysql+oursql", "Exception doesn't come back exactly the same from pickle") @testing.fails_on("mysql+mysqlconnector", diff --git a/test/engine/test_reconnect.py b/test/engine/test_reconnect.py index 6e21f572d..23a3b3703 100644 --- a/test/engine/test_reconnect.py +++ b/test/engine/test_reconnect.py @@ -143,7 +143,7 @@ class MockReconnectTest(fixtures.TestBase): assert not conn.closed assert conn.invalidated - # close shouldnt break + # close shouldn't break conn.close() diff --git a/test/ext/declarative/test_basic.py b/test/ext/declarative/test_basic.py index 496aad369..e2c2af679 100644 --- a/test/ext/declarative/test_basic.py +++ b/test/ext/declarative/test_basic.py @@ -1242,7 +1242,7 @@ class DeclarativeTest(DeclarativeTestBase): name = Column('name', String(50)) # this is not "valid" but we want to test that Address.id - # doesnt get stuck into user's table + # doesn't get stuck into user's table adr_count = Address.id diff --git a/test/ext/declarative/test_inheritance.py b/test/ext/declarative/test_inheritance.py index 22dd32e45..57ab027e1 100644 --- a/test/ext/declarative/test_inheritance.py +++ b/test/ext/declarative/test_inheritance.py @@ -151,7 +151,7 @@ class DeclarativeInheritanceTest(DeclarativeTestBase): # assert that the "id" column is available without a second # load. as of 0.7, the ColumnProperty tests all columns - # in it's list to see which is present in the row. + # in its list to see which is present in the row. sess.expunge_all() diff --git a/test/orm/inheritance/test_basic.py b/test/orm/inheritance/test_basic.py index 1737d1ccb..c3128d264 100644 --- a/test/orm/inheritance/test_basic.py +++ b/test/orm/inheritance/test_basic.py @@ -1095,7 +1095,7 @@ class FlushTest(fixtures.MappedTest): # create an Admin, and append a Role. the dependency processors # corresponding to the "roles" attribute for the Admin mapper and the User mapper - # have to ensure that two dependency processors dont fire off and insert the + # have to ensure that two dependency processors don't fire off and insert the # many to many row twice. a = Admin() a.roles.append(adminrole) diff --git a/test/orm/test_assorted_eager.py b/test/orm/test_assorted_eager.py index 09c8ea732..d00da77f5 100644 --- a/test/orm/test_assorted_eager.py +++ b/test/orm/test_assorted_eager.py @@ -289,7 +289,7 @@ class EagerTest2(fixtures.MappedTest): def test_eager_terminate(self): """Eager query generation does not include the same mapper's table twice. - Or, that bi-directional eager loads dont include each other in eager + Or, that bi-directional eager loads don't include each other in eager query generation. """ diff --git a/test/orm/test_attributes.py b/test/orm/test_attributes.py index a7c675175..ccb1effdb 100644 --- a/test/orm/test_attributes.py +++ b/test/orm/test_attributes.py @@ -218,7 +218,7 @@ class AttributesTest(fixtures.ORMTest): attributes.register_attribute(MyTest2, 'b', uselist=False, useobject=False) - # shouldnt be pickling callables at the class level + # shouldn't be pickling callables at the class level def somecallable(state, passive): return None @@ -1298,7 +1298,7 @@ class PendingBackrefTest(fixtures.ORMTest): p = Post("post 5") - # setting blog doesnt call 'posts' callable, calls with no fetch + # setting blog doesn't call 'posts' callable, calls with no fetch p.blog = b eq_( lazy_posts.mock_calls, [ diff --git a/test/orm/test_backref_mutations.py b/test/orm/test_backref_mutations.py index e9448d41c..67f8c6c00 100644 --- a/test/orm/test_backref_mutations.py +++ b/test/orm/test_backref_mutations.py @@ -393,7 +393,7 @@ class O2OScalarBackrefMoveTest(_fixtures.FixtureTest): # backref fires assert u1.address is a2 - # didnt work this way tho + # didn't work this way tho assert a1.user is u1 # moves appropriately after commit diff --git a/test/orm/test_cycles.py b/test/orm/test_cycles.py index 1da57b050..59f8198f0 100644 --- a/test/orm/test_cycles.py +++ b/test/orm/test_cycles.py @@ -383,7 +383,7 @@ class BiDirectionalManyToOneTest(fixtures.MappedTest): # the bug here is that the dependency sort comes up with T1/T2 in a # cycle, but there are no T1/T2 objects to be saved. therefore no # "cyclical subtree" gets generated, and one or the other of T1/T2 - # gets lost, and processors on T3 dont fire off. the test will then + # gets lost, and processors on T3 don't fire off. the test will then # fail because the FK's on T3 are not nullable. o3 = T3() o3.t1 = o1 @@ -592,7 +592,7 @@ class OneToManyManyToOneTest(fixtures.MappedTest): def test_cycle(self): """ - This test has a peculiar aspect in that it doesnt create as many + This test has a peculiar aspect in that it doesn't create as many dependent relationships as the other tests, and revealed a small glitch in the circular dependency sorting. diff --git a/test/orm/test_deferred.py b/test/orm/test_deferred.py index 88e7e8663..d96d420e7 100644 --- a/test/orm/test_deferred.py +++ b/test/orm/test_deferred.py @@ -80,7 +80,7 @@ class DeferredTest(AssertsCompiledSQL, _fixtures.FixtureTest): self.sql_count_(0, go) def test_unsaved_group(self): - """Deferred loading doesnt kick in when just PK cols are set""" + """Deferred loading doesn't kick in when just PK cols are set""" orders, Order = self.tables.orders, self.classes.Order @@ -204,7 +204,7 @@ class DeferredTest(AssertsCompiledSQL, _fixtures.FixtureTest): assert o2 not in sess.dirty # this will mark it as 'dirty', but nothing actually changed o2.description = 'order 3' - # therefore the flush() shouldnt actually issue any SQL + # therefore the flush() shouldn't actually issue any SQL self.assert_sql_count(testing.db, sess.flush, 0) def test_map_selectable_wo_deferred(self): diff --git a/test/orm/test_expire.py b/test/orm/test_expire.py index edd243181..150a1cb27 100644 --- a/test/orm/test_expire.py +++ b/test/orm/test_expire.py @@ -46,7 +46,7 @@ class ExpireTest(_fixtures.FixtureTest): # change the value in the DB users.update(users.c.id==7, values=dict(name='jack')).execute() sess.expire(u) - # object isnt refreshed yet, using dict to bypass trigger + # object isn't refreshed yet, using dict to bypass trigger assert u.__dict__.get('name') != 'jack' assert 'name' in attributes.instance_state(u).expired_attributes @@ -666,7 +666,7 @@ class ExpireTest(_fixtures.FixtureTest): assert 'addresses' not in u.__dict__ # hit the lazy loader. just does the lazy load, - # doesnt do the overall refresh + # doesn't do the overall refresh def go(): assert u.addresses[0].email_address=='ed@wood.com' self.assert_sql_count(testing.db, go, 1) @@ -1394,7 +1394,7 @@ class RefreshTest(_fixtures.FixtureTest): def test_refresh_with_lazy(self): """test that when a lazy loader is set as a trigger on an object's attribute - (at the attribute level, not the class level), a refresh() operation doesnt + (at the attribute level, not the class level), a refresh() operation doesn't fire the lazy loader or create any problems""" User, Address, addresses, users = (self.classes.User, diff --git a/test/orm/test_froms.py b/test/orm/test_froms.py index fd4bef71a..64e98e745 100644 --- a/test/orm/test_froms.py +++ b/test/orm/test_froms.py @@ -2408,8 +2408,8 @@ class TestOverlyEagerEquivalentCols(fixtures.MappedTest): sess.add(b2) sess.flush() - # theres an overlapping ForeignKey here, so not much option except - # to artifically control the flush order + # there's an overlapping ForeignKey here, so not much option except + # to artificially control the flush order b2.sub2 = [s2] sess.flush() diff --git a/test/orm/test_mapper.py b/test/orm/test_mapper.py index 32126e0dd..78f563b70 100644 --- a/test/orm/test_mapper.py +++ b/test/orm/test_mapper.py @@ -65,7 +65,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL): x = "something" @property def y(self): - return "somethign else" + return "something else" m = mapper(Foo, users, properties={"addresses":relationship(Address)}) @@ -102,7 +102,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL): x = "something" @property def y(self): - return "somethign else" + return "something else" m = mapper(Foo, users) a1 = aliased(Foo) diff --git a/test/orm/test_merge.py b/test/orm/test_merge.py index 494f5e349..a52274896 100644 --- a/test/orm/test_merge.py +++ b/test/orm/test_merge.py @@ -748,7 +748,7 @@ class MergeTest(_fixtures.FixtureTest): 'converted' to represent the correct objects. However, at the moment I'd rather not support this use case; if you are merging with load=False, you're typically dealing with caching and the - merged objects shouldnt be 'dirty'. + merged objects shouldn't be 'dirty'. """ @@ -782,7 +782,7 @@ class MergeTest(_fixtures.FixtureTest): self.assert_sql_count(testing.db, go, 0) def test_no_load_disallows_dirty(self): - """load=False doesnt support 'dirty' objects right now + """load=False doesn't support 'dirty' objects right now (see test_no_load_with_eager()). Therefore lets assert it. @@ -899,7 +899,7 @@ class MergeTest(_fixtures.FixtureTest): 'somenewaddress') # this use case is not supported; this is with a pending Address - # on the pre-merged object, and we currently dont support + # on the pre-merged object, and we currently don't support # 'dirty' objects being merged with load=False. in this case, # the empty '_state.parents' collection would be an issue, since # the optimistic flag is False in _is_orphan() for pending diff --git a/test/orm/test_naturalpks.py b/test/orm/test_naturalpks.py index 8c675b94d..011667651 100644 --- a/test/orm/test_naturalpks.py +++ b/test/orm/test_naturalpks.py @@ -108,7 +108,7 @@ class NaturalPKTest(fixtures.MappedTest): users.update(values={User.username:'jack'}).execute(username='ed') # expire/refresh works off of primary key. the PK is gone - # in this case so theres no way to look it up. criterion- + # in this case so there's no way to look it up. criterion- # based session invalidation could solve this [ticket:911] sess.expire(u1) assert_raises(sa.orm.exc.ObjectDeletedError, getattr, u1, 'username') diff --git a/test/orm/test_query.py b/test/orm/test_query.py index 3b483b7c0..bb731db5c 100644 --- a/test/orm/test_query.py +++ b/test/orm/test_query.py @@ -550,7 +550,7 @@ class GetTest(QueryTest): u.addresses[0].email_address = 'lala' u.orders[1].items[2].description = 'item 12' - # test that lazy load doesnt change child items + # test that lazy load doesn't change child items s.query(User).populate_existing().all() assert u.addresses[0].email_address == 'lala' assert u.orders[1].items[2].description == 'item 12' @@ -1383,7 +1383,7 @@ class FilterTest(QueryTest, AssertsCompiledSQL): assert [Address(id=2), Address(id=3), Address(id=4)] == \ sess.query(Address).join("user").filter(Address.user.has(User.name.like('%ed%'), id=8)).order_by(Address.id).all() - # test has() doesnt' get subquery contents adapted by aliased join + # test has() doesn't get subquery contents adapted by aliased join assert [Address(id=2), Address(id=3), Address(id=4)] == \ sess.query(Address).join("user", aliased=True).filter(Address.user.has(User.name.like('%ed%'), id=8)).order_by(Address.id).all() diff --git a/test/orm/test_session.py b/test/orm/test_session.py index b68810036..186b7a781 100644 --- a/test/orm/test_session.py +++ b/test/orm/test_session.py @@ -895,7 +895,7 @@ class SessionStateWFixtureTest(_fixtures.FixtureTest): assert len(u.addresses) == 3 assert newad not in u.addresses - # pending objects dont get expired + # pending objects don't get expired assert newad.email_address == 'a new address' def test_expunge_cascade(self): diff --git a/test/orm/test_unitofwork.py b/test/orm/test_unitofwork.py index 4776e2988..ada2e6c6f 100644 --- a/test/orm/test_unitofwork.py +++ b/test/orm/test_unitofwork.py @@ -1310,7 +1310,7 @@ class SaveTest(_fixtures.FixtureTest): session.add_all((u, u2)) session.flush() - # assert the first one retreives the same from the identity map + # assert the first one retrieves the same from the identity map nu = session.query(m).get(u.id) assert u is nu @@ -1430,7 +1430,7 @@ class SaveTest(_fixtures.FixtureTest): mapper(Order, orders, properties={ 'description': sa.orm.deferred(orders.c.description)}) - # dont set deferred attribute, commit session + # don't set deferred attribute, commit session o = Order(id=42) session = create_session(autocommit=False) session.add(o) diff --git a/test/orm/test_versioning.py b/test/orm/test_versioning.py index a7e6636ab..7a6dc106e 100644 --- a/test/orm/test_versioning.py +++ b/test/orm/test_versioning.py @@ -90,7 +90,7 @@ class VersioningTest(fixtures.MappedTest): else: s1.commit() - # new in 0.5 ! dont need to close the session + # new in 0.5 ! don't need to close the session f1 = s1.query(Foo).get(f1.id) f2 = s1.query(Foo).get(f2.id) diff --git a/test/sql/test_compiler.py b/test/sql/test_compiler.py index b1c807df6..e96990c61 100644 --- a/test/sql/test_compiler.py +++ b/test/sql/test_compiler.py @@ -1701,7 +1701,7 @@ class SelectTest(fixtures.TestBase, AssertsCompiledSQL): expected_test_params_list ) - # check that params() doesnt modify original statement + # check that params() doesn't modify original statement s = select([table1], or_(table1.c.myid == bindparam('myid'), table2.c.otherid == bindparam('myotherid'))) diff --git a/test/sql/test_functions.py b/test/sql/test_functions.py index 7fd7058b5..87c102a21 100644 --- a/test/sql/test_functions.py +++ b/test/sql/test_functions.py @@ -411,7 +411,7 @@ class ExecuteTest(fixtures.TestBase): @testing.fails_on_everything_except('postgresql') def test_as_from(self): - # TODO: shouldnt this work on oracle too ? + # TODO: shouldn't this work on oracle too ? x = func.current_date(bind=testing.db).execute().scalar() y = func.current_date(bind=testing.db).select().execute().scalar() z = func.current_date(bind=testing.db).scalar() diff --git a/test/sql/test_generative.py b/test/sql/test_generative.py index 5a65cecef..8a366f757 100644 --- a/test/sql/test_generative.py +++ b/test/sql/test_generative.py @@ -18,7 +18,7 @@ class TraversalTest(fixtures.TestBase, AssertsExecutionResults): def setup_class(cls): global A, B - # establish two ficticious ClauseElements. + # establish two fictitious ClauseElements. # define deep equality semantics as well as deep # identity semantics. class A(ClauseElement): diff --git a/test/sql/test_metadata.py b/test/sql/test_metadata.py index e4047872d..c078babff 100644 --- a/test/sql/test_metadata.py +++ b/test/sql/test_metadata.py @@ -541,7 +541,7 @@ class ToMetaDataTest(fixtures.TestBase, ComparesTables): table_c.c.bar.onupdate.arg) == 'z' assert isinstance(table2_c.c.id.default, Sequence) - # constraints dont get reflected for any dialect right + # constraints don't get reflected for any dialect right # now if has_constraints: diff --git a/test/sql/test_selectable.py b/test/sql/test_selectable.py index a5693acd3..ed97bb37f 100644 --- a/test/sql/test_selectable.py +++ b/test/sql/test_selectable.py @@ -216,7 +216,7 @@ class SelectableTest(fixtures.TestBase, AssertsExecutionResults, AssertsCompiled jj = select([table1.c.col1.label('bar_col1')]) jjj = join(table1, jj, table1.c.col1 == jj.c.bar_col1) - # test column directly agaisnt itself + # test column directly against itself assert jjj.corresponding_column(jjj.c.table1_col1) \ is jjj.c.table1_col1 diff --git a/test/sql/test_text.py b/test/sql/test_text.py index ef63f9daa..98eff7604 100644 --- a/test/sql/test_text.py +++ b/test/sql/test_text.py @@ -63,7 +63,7 @@ class SelectCompositionTest(fixtures.TestBase, AssertsCompiledSQL): ) def test_select_composition_four(self): - # test that use_labels doesnt interfere with literal columns + # test that use_labels doesn't interfere with literal columns self.assert_compile( select(["column1", "column2", table1.c.myid], from_obj=table1, use_labels=True), @@ -72,7 +72,7 @@ class SelectCompositionTest(fixtures.TestBase, AssertsCompiledSQL): ) def test_select_composition_five(self): - # test that use_labels doesnt interfere + # test that use_labels doesn't interfere # with literal columns that have textual labels self.assert_compile( select(["column1 AS foobar", "column2 AS hoho", table1.c.myid], @@ -83,8 +83,8 @@ class SelectCompositionTest(fixtures.TestBase, AssertsCompiledSQL): def test_select_composition_six(self): # test that "auto-labeling of subquery columns" - # doesnt interfere with literal columns, - # exported columns dont get quoted + # doesn't interfere with literal columns, + # exported columns don't get quoted self.assert_compile( select(["column1 AS foobar", "column2 AS hoho", table1.c.myid], from_obj=[table1]).select(), diff --git a/test/sql/test_types.py b/test/sql/test_types.py index e887e2a7e..19be4466d 100644 --- a/test/sql/test_types.py +++ b/test/sql/test_types.py @@ -571,7 +571,7 @@ class TypeCoerceCastTest(fixtures.TablesTest): MyType = self.MyType # test coerce from nulltype - e.g. use an object that - # doens't match to a known type + # does't match to a known type class MyObj(object): def __str__(self): return "THISISMYOBJ" |