Commit Graph

11 Commits

Author SHA1 Message Date
Erik Johnson
6d52aeb739
Replace os.walk with a helper function
On PY2, when os.walk is invoked with a str as input, the paths in the
return data are all str types as well. This leaves undecoded unicode
data in those strings when files/dirs under the top dir that was passed
contain unicode characters in the filename.

>>> import os
>>> list(os.walk('temp'))
[('temp', [], ['\xd0\x94.txt', 'foo.txt'])]
>>> list(os.walk(u'temp'))
[(u'temp', [], [u'\u0414.txt', u'foo.txt'])]

The helper introduced here ensures that we always invoke os.walk with a
unicode top-level dir, so that we get unicode types in the return data.
2017-12-13 16:38:12 -06:00
Daniel Wallace
319b811f2f
exclude module name checker for kitchen helpers 2017-10-17 15:18:19 -06:00
twangboy
2722e9521d Use os.path.join to create paths 2017-08-23 14:43:44 -06:00
Pablo Suárez Hernández
6eea8179ad Pylint fixes 2017-06-21 10:09:11 +01:00
Pedro Algarvio
4ef895e064
Add file to ignored paths 2017-04-01 14:22:54 +01:00
Pedro Algarvio
5f388e7ea2
Minor fixes 2017-03-03 15:19:24 +00:00
Pedro Algarvio
40a64191a1
Absolute imports and A LOT of code cleanup. 2017-03-01 01:33:07 +00:00
Pedro Algarvio
3beb3fb801
Move whatever we need from salttesting to salt.
Let's drop the salttesting dependency cycle.
2017-02-28 22:52:49 +00:00
Pedro Algarvio
1daa2e24cd
Moved some test supporting modules to tests/support
Previously they were in tests/utils which also had test case modules.
2017-02-28 22:52:48 +00:00
Pedro Algarvio
62cf3c454e
Add LoaderModuleMockMixin 2017-02-24 00:49:31 +00:00
Pedro Algarvio
ad3dbee189
Add test case to make sure we always proper test module names from now on 2017-02-23 23:19:46 +00:00