ut: format testcases
This commit is contained in:
parent
00fbfe274a
commit
edbed0a167
6 changed files with 422 additions and 123 deletions
|
|
@ -9,8 +9,12 @@ class TestUniquePath(unittest.TestCase):
|
|||
|
||||
def test_unique_path(self):
|
||||
for i in range(1000):
|
||||
self.assertNotEqual(cli._unique_path('prefix'), cli._unique_path('prefix'))
|
||||
self.assertRegexpMatches(cli._unique_path('prefix'), '^prefix/\d{10}\.\d{1,6}\.[a-zA-Z]{8}$')
|
||||
self.assertNotEqual(
|
||||
cli._unique_path('prefix'),
|
||||
cli._unique_path('prefix'))
|
||||
self.assertRegexpMatches(
|
||||
cli._unique_path('prefix'),
|
||||
'^prefix/\d{10}\.\d{1,6}\.[a-zA-Z]{8}$')
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue