File tree Expand file tree Collapse file tree 4 files changed +36
-0
lines changed
Expand file tree Collapse file tree 4 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ """
2+ Short Description
3+ """
4+
5+ __version__ = "1.0.0"
Original file line number Diff line number Diff line change 1+ [build-system ]
2+ requires = [" flit_core >=2,<4" ]
3+ build-backend = " flit_core.buildapi"
4+
5+ [tool .flit .metadata ]
6+ module = " packageunicode"
7+ author = " Sir Robin"
8+ author-email = " robin@camelot.uk"
9+ home-page = " http://github.com/sirrobin/package2"
Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
2+
13from pathlib import Path
24import pytest
35import shutil
1214
1315LIST_FILES_TEMPLATE = """\
1416 #!{python}
17+ # -*- coding: utf-8 -*-
1518import sys
1619from os.path import join
1720if '--deleted' not in sys.argv:
@@ -69,3 +72,22 @@ def test_build_module_no_docstring():
6972 with pytest .raises (common .NoDocstringError ) as exc_info :
7073 build .main (pyproject )
7174 assert 'no_docstring.py' in str (exc_info .value )
75+
76+ def test_build_package_with_unicode (copy_sample ):
77+ list_files_template = """\
78+ #!{python}
79+ # -*- coding: utf-8 -*-
80+ import sys
81+ from os.path import join
82+ if '--deleted' not in sys.argv:
83+ files = ['pyproject.toml', 'packageunicode/__init__.py', 'packageunicode/Noël.jpg']
84+ print('\\ 0'.join(files), end='\\ 0')
85+ """
86+ td = copy_sample ('packageunicode' )
87+ (td / '.git' ).mkdir () # Fake a git repo
88+
89+ with MockCommand ('git' , list_files_template .format (python = sys .executable )):
90+ res = build .main (td / 'pyproject.toml' , formats = {'sdist' })
91+
92+ # Compare str path to work around pathlib/pathlib2 mismatch on Py 3.5
93+ assert [str (p ) for p in (td / 'dist' ).iterdir ()] == [str (res .sdist .file )]
You can’t perform that action at this time.
0 commit comments