mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
test-network: replace unnecessary assertRegex() with assertIn()
This fixes the following warning:
```
/tmp/systemd/test/test-network/systemd-networkd-tests.py:5107: SyntaxWarning: invalid escape sequence '\.'
self.assertRegex(output, 'inet 10\.234\.77\.111/32.*dummy98')
```
Follow-up for 6479204e56.
This commit is contained in:
@@ -5104,11 +5104,11 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
|
||||
|
||||
output = check_output('ip -4 addr show dev dummy98')
|
||||
print(output)
|
||||
self.assertRegex(output, 'inet 10\.234\.77\.111/32.*dummy98')
|
||||
self.assertIn('inet 10.234.77.111/32', output)
|
||||
|
||||
output = check_output('ip -6 addr show dev dummy98')
|
||||
print(output)
|
||||
self.assertRegex(output, 'inet6 2222:3333::4444/64 scope global')
|
||||
self.assertIn('inet6 2222:3333::4444/64 scope global', output)
|
||||
|
||||
def check_nexthop(self, manage_foreign_nexthops, first):
|
||||
self.wait_online('veth99:routable', 'veth-peer:routable', 'dummy98:routable')
|
||||
|
||||
Reference in New Issue
Block a user