File tree Expand file tree Collapse file tree 3 files changed +21
-15
lines changed Expand file tree Collapse file tree 3 files changed +21
-15
lines changed Original file line number Diff line number Diff line change @@ -65,10 +65,10 @@ def run(build_file_name, arguments):
65
65
66
66
67
67
def execute (command ):
68
- print ("---------------------------------------------------" )
69
- print ("Name: " + command .name )
70
- print ("Command: " + command .cmd )
71
- print ("---------------------------------------------------" )
68
+ print (dash )
69
+ print ("Name: " + command .name )
70
+ print ("Command: " + command .cmd )
71
+ print (dash )
72
72
os .system (command .cmd )
73
73
74
74
@@ -91,7 +91,7 @@ def __parse_project_config__():
91
91
except :
92
92
raise ValueError (
93
93
"Error in parsing " + __buildFileName__ () + " config file. Make sure file is in correct format.\n Sample format is:\n \n " +
94
- "--------------------------------------------------- \n " + sample_yaml_file () + "\n --------------------------------------------------- \n "
94
+ dash + " \n " + sample_yaml_file () + "\n " + dash + " \n "
95
95
)
96
96
else :
97
97
raise ValueError ("No " + __buildFileName__ () + " file found in current directory." )
@@ -118,4 +118,6 @@ def sample_yaml_file():
118
118
" - lint: ./gradlew spotlessApply"
119
119
120
120
121
+ dash = '-' * 50
122
+
121
123
run (BUILD_FILE_NAME , sys .argv )
Original file line number Diff line number Diff line change
1
+ [bdist_wheel]
2
+ universal = 1
Original file line number Diff line number Diff line change 5
5
6
6
build = imp .load_source ('1build' , '1build' )
7
7
8
+ dash = '-' * 50
9
+
8
10
9
11
def test_build_successful_command (capsys ):
10
12
build .run ("tests/build_file.yaml" , ['file_name' , 'build' ])
11
13
captured = capsys .readouterr ()
12
- expected_message = "--------------------------------------------------- \n " \
13
- "Name: build\n " \
14
- "Command: ls\n " \
15
- "--------------------------------------------------- \n "
14
+ expected_message = "" + dash + " \n " \
15
+ "Name: build\n " \
16
+ "Command: ls\n " \
17
+ + dash + " \n "
16
18
assert expected_message in captured .out
17
19
18
20
@@ -22,12 +24,12 @@ def test_should_fail_with_invalid_file_message_if_file_is_not_in_correct_yaml_fo
22
24
23
25
invalid_file_error_message = "Error in parsing 'tests/invalid_yaml_file.yaml' config file. Make sure file is in correct format.\n " \
24
26
"Sample format is:\n \n " \
25
- "--------------------------------------------------- \n " \
26
- "project: Sample Project\n " \
27
- "commands:\n " \
28
- " - build: ./gradlew clean build\n " \
29
- " - lint: ./gradlew spotlessApply\n " \
30
- "---------------------------------------------------"
27
+ + dash + " \n " \
28
+ "project: Sample Project\n " \
29
+ "commands:\n " \
30
+ " - build: ./gradlew clean build\n " \
31
+ " - lint: ./gradlew spotlessApply\n " \
32
+ + dash
31
33
32
34
assert invalid_file_error_message in captured .out
33
35
You can’t perform that action at this time.
0 commit comments