Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 219f078

Browse files
committedJan 15, 2019
chore: add unittest for File.read()
1 parent 4c25a87 commit 219f078

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed
 

‎core_tests/utils/file.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/Users/nsbuilduser/workspace/master-schematics-e2e-node10-osx/node_modules/.bin/ng serve --prod
2+
====>
3+
****************************************************************************************
4+
This is a simple server for use in testing or debugging Angular applications locally.
5+
It hasn't been reviewed for security issues.
6+
7+
DON'T USE IT FOR PRODUCTION!
8+
****************************************************************************************
9+
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
10+
11+
Date: 2019-01-15T08:31:25.643Z
12+
Hash: 5aa86c5c55ced8670c09
13+
Time: 82659ms
14+
chunk {0} runtime.ec2944dd8b20ec099bf3.js, runtime.ec2944dd8b20ec099bf3.js.map (runtime) 1.46 kB [entry] [rendered]
15+
chunk {1} main.ae1a703d1dd71da30f7f.js, main.ae1a703d1dd71da30f7f.js.map (main) 315 kB [initial] [rendered]
16+
chunk {2} polyfills.d5bca1f0afba04611c55.js, polyfills.d5bca1f0afba04611c55.js.map (polyfills) 41.1 kB [initial] [rendered]
17+
chunk {3} styles.34659264d1f7dcb6fd02.css, styles.34659264d1f7dcb6fd02.css.map (styles) 59 bytes [initial] [rendered]
18+
ℹ 「wdm」: Compiled successfully.

‎core_tests/utils/file_tests.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77

88
# noinspection PyMethodMayBeStatic
99
class FileUtilsTests(unittest.TestCase):
10-
def test_01_replace(self):
10+
11+
def test_01_read(self):
12+
logs = os.path.join(Settings.TEST_RUN_HOME, 'core_tests', 'utils', 'file.txt')
13+
assert 'Compiled successfully' in File.read(logs)
14+
15+
def test_02_replace(self):
1116
# Path to files
1217
base_path = os.path.join(Settings.TEST_RUN_HOME, 'core_tests', 'utils')
1318
old_scss = os.path.join(base_path, 'app.android.scss')

‎data/changes.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22

33
from core.settings import Settings
44
from core.utils.file_utils import File
5-
6-
7-
# noinspection PyShadowingBuiltins
85
from data.const import Colors
96

107

8+
# noinspection PyShadowingBuiltins
119
class ChangeSet(object):
1210
def __init__(self, file, old_value, new_value, old_text=None, new_text=None, old_color=None, new_color=None):
1311
self.file = file

0 commit comments

Comments
 (0)
Please sign in to comment.