-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 🔬 let's start the test first. #117 * 🐛 fix import error * 🔬 show true failures on windows * 🐛fix samefile not available on windows. python-rope/ropevim#66 * 🐛 fix windows os path problem * 💚 make windows ci work * 💚 final touch on the windows ci failure * 💄 beautify the code using black and isort * 📰 show sub folder on windows * 🐛 jinja2 does not windows style file path * 💚 fix last failure...sigh.. * 📚 update change log
- Loading branch information
Showing
20 changed files
with
107 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
docs/level-7-use-custom-jinja2-filter-test-n-global/filter.output
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
docs/level-8-pass-a-folder-full-of-templates/template-folder/show_sub_folder_on_windows.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
please |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from os.path import normcase, normpath | ||
|
||
|
||
def samefile(file1, file2): | ||
return normcase(normpath(file1)) == normcase(normpath(file2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
pip freeze | ||
|
||
nosetests --with-coverage --cover-package=moban --cover-package=tests | ||
flake8 . --exclude=docs,.moban.d --ignore=E203,E121,E123,E126,E226,E24,E704,W503,W504 | ||
nosetests --with-coverage --cover-package=moban --cover-package=tests && flake8 . --exclude=docs,.moban.d --ignore=E203,E121,E123,E126,E226,E24,E704,W503,W504 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
configuration: | ||
template_dir: | ||
- . | ||
targets: | ||
- a.output: symbolic-link | ||
- b.output: sym-link-to-file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/tmp/adobegc.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import os | ||
import sys | ||
from textwrap import dedent | ||
|
||
from mock import patch | ||
from nose import SkipTest | ||
from nose.tools import eq_ | ||
|
||
from moban.main import main | ||
|
||
|
||
def custom_dedent(long_texts): | ||
refined = dedent(long_texts) | ||
if refined.startswith("\n"): | ||
refined = refined[1:] | ||
return refined | ||
|
||
|
||
class TestTutorial: | ||
def setUp(self): | ||
self.current = os.getcwd() | ||
|
||
def test_symbolic_link_on_windows(self): | ||
if sys.platform != "win32": | ||
raise SkipTest("No need to test on linux nor macos") | ||
|
||
expected = "/tmp" | ||
|
||
folder = "symbolic-link-gets-junk" | ||
self._raw_moban(["moban"], folder, expected, "a.output") | ||
|
||
def _moban(self, folder, expected): | ||
args = ["moban", "-c", "data.yml", "-t", "a.template"] | ||
self._raw_moban(args, folder, expected, "moban.output") | ||
|
||
def _raw_moban(self, args, folder, expected, output): | ||
os.chdir(os.path.join("tests", "regression-pack", folder)) | ||
with patch.object(sys, "argv", args): | ||
main() | ||
_verify_content(output, expected) | ||
os.unlink(output) | ||
|
||
def tearDown(self): | ||
if os.path.exists(".moban.hashes"): | ||
os.unlink(".moban.hashes") | ||
os.chdir(self.current) | ||
|
||
|
||
def _verify_content(file_name, expected): | ||
with open(file_name, "r") as f: | ||
content = f.read() | ||
eq_(content, expected) |