Skip to content

Commit f61cef9

Browse files
Remove regex dll, Unskip tests
dll file in repo violates security policy unskip passed tests
1 parent 2aed0c8 commit f61cef9

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

mssql/regex_clr.dll

-4.5 KB
Binary file not shown.

testapp/runners.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,21 @@
22
from django.conf import settings
33

44
EXCLUDED_TESTS = getattr(settings, 'EXCLUDED_TESTS', [])
5+
REGEX_TESTS = getattr(settings, 'REGEX_TESTS', [])
6+
7+
ENABLE_REGEX_TESTS = getattr(settings, 'ENABLE_REGEX_TESTS', False)
58

69

710
class ExcludedTestSuiteRunner(DiscoverRunner):
811
def build_suite(self, *args, **kwargs):
912
suite = super().build_suite(*args, **kwargs)
1013
tests = []
1114
for case in suite:
12-
if not case.id() in EXCLUDED_TESTS:
13-
tests.append(case)
15+
if ENABLE_REGEX_TESTS:
16+
if not case.id() in EXCLUDED_TESTS:
17+
tests.append(case)
18+
else:
19+
if not case.id() in EXCLUDED_TESTS + REGEX_TESTS:
20+
tests.append(case)
1421
suite._tests = tests
1522
return suite

testapp/settings.py

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
'django.contrib.auth.hashers.MD5PasswordHasher',
3838
]
3939

40+
ENABLE_REGEX_TESTS = False
41+
4042
TEST_RUNNER = "testapp.runners.ExcludedTestSuiteRunner"
4143
EXCLUDED_TESTS = ['aggregation.tests.AggregateTestCase.test_expression_on_aggregation',
4244
'aggregation_regress.tests.AggregationTests.test_annotated_conditional_aggregate',
@@ -51,22 +53,6 @@
5153
'expressions.tests.FTimeDeltaTests.test_duration_with_datetime_microseconds',
5254
'expressions.tests.IterableLookupInnerExpressionsTests.test_expressions_in_lookups_join_choice',
5355
'expressions_case.tests.CaseExpressionTests.test_annotate_with_in_clause',
54-
'fixtures_regress.tests.TestFixtures.test_loaddata_with_m2m_to_self',
55-
'fixtures_regress.tests.TestFixtures.test_loaddata_with_valid_fixture_dirs',
56-
'fixtures_regress.tests.TestFixtures.test_loaddata_works_when_fixture_has_forward_refs',
57-
'fixtures_regress.tests.TestFixtures.test_path_containing_dots',
58-
'fixtures_regress.tests.TestFixtures.test_pg_sequence_resetting_checks',
59-
'fixtures_regress.tests.TestFixtures.test_pretty_print_xml',
60-
'fixtures_regress.tests.TestFixtures.test_proxy_model_included',
61-
'fixtures_regress.tests.TestFixtures.test_relative_path',
62-
'fixtures_regress.tests.TestFixtures.test_relative_path_in_fixture_dirs',
63-
'fixtures_regress.tests.TestFixtures.test_ticket_20820',
64-
'fixtures_regress.tests.TestFixtures.test_ticket_22421',
65-
'lookup.tests.LookupTests.test_regex',
66-
'lookup.tests.LookupTests.test_regex_backreferencing',
67-
'lookup.tests.LookupTests.test_regex_non_ascii',
68-
'lookup.tests.LookupTests.test_regex_non_string',
69-
'lookup.tests.LookupTests.test_regex_null',
7056
'ordering.tests.OrderingTests.test_orders_nulls_first_on_filtered_subquery',
7157
'queries.test_bulk_update.BulkUpdateNoteTests.test_set_field_to_null',
7258
'get_or_create.tests.UpdateOrCreateTransactionTests.test_creation_in_transaction',
@@ -174,3 +160,10 @@
174160
'schema.tests.SchemaTests.test_alter_primary_key_quoted_db_table',
175161
'schema.tests.SchemaTests.test_alter_smallint_pk_to_smallautofield_pk'
176162
]
163+
164+
REGEX_TESTS = ['lookup.tests.LookupTests.test_regex',
165+
'lookup.tests.LookupTests.test_regex_backreferencing',
166+
'lookup.tests.LookupTests.test_regex_non_ascii',
167+
'lookup.tests.LookupTests.test_regex_non_string',
168+
'lookup.tests.LookupTests.test_regex_null'
169+
]

tox.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ whitelist_externals =
99
/bin/bash
1010

1111
commands =
12-
python manage.py test
12+
python manage.py test --noinput
1313
bash test.sh
1414

1515
deps =
1616
django22: django==2.2.*
1717
django30: django>=3.0a1,<3.1
18-

0 commit comments

Comments
 (0)