Mercurial > wikked
comparison tests/test_mock.py @ 225:ebb12ff21cb2
Updated unit tests to be able to run.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 12 Mar 2014 23:02:40 -0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
224:d45450a0256a | 225:ebb12ff21cb2 |
---|---|
1 import pytest | |
2 from .mock import MockFileSystem | |
3 | |
4 | |
5 @pytest.mark.parametrize('flat, expected', [ | |
6 ({}, {}), | |
7 ({'/foo.txt': 'Bar'}, {'foo.txt': 'Bar'}), | |
8 ({'/tmp/foo.txt': 'Bar'}, {'tmp': {'foo.txt': 'Bar'}}), | |
9 ( | |
10 {'/tmp/foo.txt': 'Bar', '/tmp/bar': 'Foo'}, | |
11 {'tmp': {'foo.txt': 'Bar', 'bar': 'Foo'}})]) | |
12 def test_flat_to_nested(flat, expected): | |
13 actual = MockFileSystem.flat_to_nested(flat) | |
14 assert actual == expected |