Stein Magnus Jodal
a221036e5a
tests: Fix error message
2012-12-12 23:05:12 +01:00
Stein Magnus Jodal
905ceeb72a
utils: find_files() returns bytestrings
2012-12-12 13:45:37 +01:00
Stein Magnus Jodal
b5d9dc10a7
utils: Handle paths with non-UTF-8 encodings
...
- path_to_uri() encodes unicode input as UTF-8 and leaves bytestring input
unchanged before it is converted to file:// URIs.
- uri_to_path() will now always return bytestrings, since we don't know if
there is any non-UTF-8 encoded chars in the file path, and converting it to
unicode would make such paths no longer match the dir or file it was
referring to.
- split_path() will now assume it gets a bytestring in.
2012-12-12 13:45:37 +01:00
Stein Magnus Jodal
6acaa490e9
Make all strings unicode by default ( fixes #224 )
2012-11-13 00:18:47 +01:00
Stein Magnus Jodal
ac60bcdf8e
Fix all flake8 warnings in tests ( #211 )
2012-10-16 14:43:31 +02:00
Thomas Adamcik
5a47dfe159
Update import style in tests.utils.path
2012-09-16 22:44:15 +02:00
Thomas Adamcik
a707daf458
Add tests for expand_path and fix ordering.
...
Expansions need to happen before abspath is called or else result is wrong.
2012-09-16 22:26:44 +02:00
Thomas Adamcik
7ceb530064
Updated find files to ignore hidden files and folders.
2012-09-16 18:14:11 +02:00
Stein Magnus Jodal
8c2a333938
get_or_create_folder should also create intermediate folders
2012-02-09 23:12:40 +01:00
Thomas Adamcik
1985b4af76
Switch all tests over to from tests import unittest, which will be unittest2 on < 2.7 and plain unittest otherwise
2011-07-31 22:21:34 +02:00
Stein Magnus Jodal
79771d6e2c
Rename data_folder() to path_to_data_dir()
2011-04-07 15:55:03 +02:00
Stein Magnus Jodal
c097af1a83
Fix a bunch of pylint errors/warnings in test suite
2011-01-23 18:39:05 +01:00
Thomas Adamcik
fe309d374e
Get rid of all kinds of abspath and expandpath usage that is no longer needed
2010-11-01 00:37:55 +01:00
Thomas Adamcik
dd259d0797
Ensure that find_files only returns unicode
2010-10-30 23:12:32 +02:00
Thomas Adamcik
92333208de
Add mopidy.utils.path.mtime helper that is easily faked in tests
2010-10-30 20:53:23 +02:00
Thomas Adamcik
d2d8e4c090
Use expanduser for find_files
2010-10-30 00:45:08 +02:00
Thomas Adamcik
a48e881040
Add split path util
2010-10-29 22:55:42 +02:00
Thomas Adamcik
d785b9b14e
Added uri_to_path with tests
2010-10-29 22:16:33 +02:00
Thomas Adamcik
efc60a943b
Update find files behaviour and add test for it
2010-10-26 00:08:51 +02:00
Stein Magnus Jodal
e4edd70c6d
Split mopidy.utils into smaller pieces
2010-08-17 00:32:31 +02:00