Index: modeltests/empty/models.py
===================================================================
--- modeltests/empty/models.py	(revision 6000)
+++ modeltests/empty/models.py	(working copy)
@@ -6,11 +6,13 @@
 """
 
 from django.db import models
+from django.conf import settings
 
 class Empty(models.Model):
     pass
 
-__test__ = {'API_TESTS':"""
+if settings.DATABASE_ENGINE not in ('mssql',):
+    __test__ = {'API_TESTS':"""
 >>> m = Empty()
 >>> m.id
 >>> m.save()
@@ -22,5 +24,7 @@
 True
 >>> existing = Empty(m.id)
 >>> existing.save()
+"""}
 
-"""}
+else:
+    __test__ = {'API_TESTS':""}
Index: modeltests/lookup/models.py
===================================================================
--- modeltests/lookup/models.py	(revision 6000)
+++ modeltests/lookup/models.py	(working copy)
@@ -274,7 +274,11 @@
 >>> a4.save()
 >>> a5 = Article(pub_date=now, headline='hey-Foo')
 >>> a5.save()
+"""}
 
+
+if settings.DATABASE_ENGINE not in ('mssql',):
+    __test__['API_TESTS'] += r"""
 # zero-or-more
 >>> Article.objects.filter(headline__regex=r'fo*')
 [<Article: f>, <Article: fo>, <Article: foo>, <Article: fooo>]
@@ -288,7 +292,11 @@
 # wildcard
 >>> Article.objects.filter(headline__regex=r'fooo?')
 [<Article: foo>, <Article: fooo>]
+"""
 
+
+
+__test__['API_TESTS'] += r"""
 # and some more:
 >>> a6 = Article(pub_date=now, headline='bar')
 >>> a6.save()
@@ -298,7 +306,11 @@
 >>> a8.save()
 >>> a9 = Article(pub_date=now, headline='baxZ')
 >>> a9.save()
+"""
 
+
+if settings.DATABASE_ENGINE not in ('mssql',):
+    __test__['API_TESTS'] += r"""
 # leading anchor
 >>> Article.objects.filter(headline__regex=r'^b')
 [<Article: bar>, <Article: baxZ>, <Article: baz>]
@@ -318,7 +330,10 @@
 [<Article: baxZ>]
 >>> Article.objects.filter(headline__iregex=r'ba[RxZ]')
 [<Article: bar>, <Article: baxZ>, <Article: baz>]
+"""
 
+
+__test__['API_TESTS'] += r"""
 # and yet more:
 >>> a10 = Article(pub_date=now, headline='foobar')
 >>> a10.save()
@@ -334,7 +349,11 @@
 >>> a15.save()
 >>> a16 = Article(pub_date=now, headline='bazbaRFOO')
 >>> a16.save()
+"""
 
+
+if settings.DATABASE_ENGINE not in ('mssql',):
+    __test__['API_TESTS'] += r"""
 # alternation
 >>> Article.objects.filter(headline__regex=r'oo(f|b)')
 [<Article: barfoobaz>, <Article: foobar>, <Article: foobarbaz>, <Article: foobaz>]
@@ -348,10 +367,10 @@
 [<Article: barfoobaz>, <Article: baz>, <Article: bazbaRFOO>, <Article: foobarbaz>, <Article: foobaz>]
 >>> Article.objects.filter(headline__iregex=r'b.*ar')
 [<Article: bar>, <Article: barfoobaz>, <Article: bazbaRFOO>, <Article: foobar>, <Article: foobarbaz>]
-"""}
+"""
 
 
-if settings.DATABASE_ENGINE not in ('mysql', 'mysql_old'):
+if settings.DATABASE_ENGINE not in ('mysql', 'mysql_old', 'mssql'):
     __test__['API_TESTS'] += r"""
 # grouping and backreferences
 >>> Article.objects.filter(headline__regex=r'b(.).*b\1')
