Skip to content

Commit 35b7f96

Browse files
authored
Merge pull request #70 from testing-cabal/fix-compat
Fix compat
2 parents 33fcf3f + b9391ba commit 35b7f96

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

testrepository/testcommand.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def __init__(
202202

203203
def setUp(self):
204204
super(TestListingFixture, self).setUp()
205-
variable_regex = "\$(IDOPTION|IDFILE|IDLIST|LISTOPT)"
205+
variable_regex = r"\$(IDOPTION|IDFILE|IDLIST|LISTOPT)"
206206
variables = {}
207207
list_variables = {"LISTOPT": self.listopt}
208208
cmd = self.template
@@ -350,7 +350,7 @@ def _per_instance_command(self, cmd):
350350
# --list-tests cannot use FILES, so handle it being unset.
351351
"FILES": getattr(self, "list_file_name", None) or "",
352352
}
353-
variable_regex = "\$(INSTANCE_ID|COMMAND|FILES)"
353+
variable_regex = r"\$(INSTANCE_ID|COMMAND|FILES)"
354354

355355
def subst(match):
356356
return variables.get(match.groups(1)[0], "")
@@ -553,7 +553,7 @@ def _dispose_instances(self):
553553
dispose_cmd = self.get_parser().get("DEFAULT", "instance_dispose")
554554
except (ValueError, configparser.NoOptionError):
555555
return
556-
variable_regex = "\$INSTANCE_IDS"
556+
variable_regex = r"\$INSTANCE_IDS"
557557
dispose_cmd = re.sub(
558558
variable_regex,
559559
" ".join(sorted(instance.decode("utf") for instance in instances)),
@@ -675,7 +675,7 @@ def obtain_instance(self, concurrency):
675675
except configparser.NoOptionError:
676676
# Instance allocation not configured
677677
return None
678-
variable_regex = "\$INSTANCE_COUNT"
678+
variable_regex = r"\$INSTANCE_COUNT"
679679
cmd = re.sub(variable_regex, str(concurrency - len(self._instances)), cmd)
680680
self.ui.output_values([("running", cmd)])
681681
proc = self.ui.subprocess_Popen(cmd, shell=True, stdout=subprocess.PIPE)

testrepository/tests/test_repository.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def test_get_test_run_get_id(self):
365365
self.assertEqual(inserted, run.get_id())
366366

367367
def test_get_test_run_preserves_time(self):
368-
self.skip("Fix me before releasing.")
368+
self.skipTest("Fix me before releasing.")
369369
# The test run outputs the time events that it received.
370370
now = datetime(2001, 1, 1, 0, 0, 0, tzinfo=iso8601.UTC)
371371
second = timedelta(seconds=1)

0 commit comments

Comments
 (0)