Fix test/improve tests a bit in py27

This commit is contained in:
Bruno Oliveira 2018-11-22 21:38:33 -02:00
parent 0385c27343
commit c5c728c8bc
1 changed files with 3 additions and 2 deletions

View File

@ -904,9 +904,9 @@ def test_gitignore(testdir):
assert gitignore_path.read_text(encoding="UTF-8") == msg assert gitignore_path.read_text(encoding="UTF-8") == msg
# Does not overwrite existing/custom one. # Does not overwrite existing/custom one.
gitignore_path.write_text("") gitignore_path.write_text(u"custom")
cache.set("something", "else") cache.set("something", "else")
assert gitignore_path.read_text(encoding="UTF-8") == "" assert gitignore_path.read_text(encoding="UTF-8") == "custom"
def test_does_not_create_boilerplate_in_existing_dirs(testdir): def test_does_not_create_boilerplate_in_existing_dirs(testdir):
@ -922,5 +922,6 @@ def test_does_not_create_boilerplate_in_existing_dirs(testdir):
cache = Cache.for_config(config) cache = Cache.for_config(config)
cache.set("foo", "bar") cache.set("foo", "bar")
assert os.path.isdir("v") # cache contents
assert not os.path.exists(".gitignore") assert not os.path.exists(".gitignore")
assert not os.path.exists("README.md") assert not os.path.exists("README.md")