Code cleanup, use pathlib, use pytest keyboard
Clean up checks and logics that are unnecessary due to MILC updates. Use pathlib instead of os.path for readability. Use the 'pytest' keyboard for the tests. Add community layout for 'handwired/onekey/pytest' so we can test community layouts.
This commit is contained in:
parent
8eeab1112a
commit
3db41817e0
7 changed files with 30 additions and 32 deletions
|
@ -33,16 +33,3 @@ def normpath(path):
|
|||
return os.path.normpath(path)
|
||||
|
||||
return os.path.normpath(os.path.join(os.environ['ORIG_CWD'], path))
|
||||
|
||||
|
||||
def file_lines(filename):
|
||||
""" Return a files content, line by line
|
||||
|
||||
Args:
|
||||
filename: path to the file
|
||||
|
||||
Returns:
|
||||
an list, in which each item is a line of the file
|
||||
"""
|
||||
with open(filename, "r") as fd:
|
||||
return fd.readlines()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue