@@ -75,7 +75,7 @@ def test_format_formula_data():
7575 Here, we reuse our 'recorded' formulas from the test suite as the dummy formulas that may have
7676 been found in a user's git repo.
7777 """
78- formulas = ReadmeUpdater .format_formula_data ('./ test' )
78+ formulas = ReadmeUpdater .format_formula_data ('test' )
7979
8080 assert len (formulas ) == 16
8181 assert formulas [1 ] == {
@@ -92,7 +92,7 @@ def test_format_formula_data_error_reading_formula():
9292 with patch ('builtins.open' , mock_open ()) as mock_opening :
9393 mock_opening .side_effect = OSError
9494 with pytest .raises (SystemExit ) as error :
95- ReadmeUpdater .format_formula_data ('./ test' )
95+ ReadmeUpdater .format_formula_data ('test' )
9696
9797 assert str (error .value ) == 'There was a problem opening or reading the formula data: '
9898
@@ -128,6 +128,7 @@ def test_retrieve_old_table_not_found():
128128 assert old_table_found is False
129129
130130
131+ @patch ('homebrew_releaser.utils.WORKING_DIR' , '' )
131132@pytest .mark .parametrize (
132133 'table_content' ,
133134 [
@@ -156,16 +157,17 @@ def test_retrieve_old_table(table_content):
156157@patch ('logging.Logger.error' )
157158def test_retrieve_old_table_no_readme (mock_logger ):
158159 """Tests that we retrieve only the old table data when start and end tags exist."""
159- old_table , old_table_found = ReadmeUpdater .retrieve_old_table ('./ test' )
160+ old_table , old_table_found = ReadmeUpdater .retrieve_old_table ('test' )
160161
161162 mock_logger .assert_called_once_with ('Could not find a valid README in this project to update.' )
162163 assert old_table == ''
163164 assert old_table_found is False
164165
165166
167+ @patch ('homebrew_releaser.utils.WORKING_DIR' , '' )
166168def test_read_current_readme_does_not_exist ():
167169 """Tests that the file contents of a README that doesn't exist is empty."""
168- readme = ReadmeUpdater .read_current_readme ('./ test' )
170+ readme = ReadmeUpdater .read_current_readme ('test' )
169171
170172 assert readme == ""
171173
@@ -178,6 +180,7 @@ def test_read_current_readme():
178180 assert '# Homebrew Releaser' in readme
179181
180182
183+ @patch ('homebrew_releaser.utils.WORKING_DIR' , '' )
181184def test_replace_table_contents ():
182185 """Test that we add the new README changes to git."""
183186 with patch ('builtins.open' , mock_open ()):
@@ -189,6 +192,7 @@ def test_replace_table_contents():
189192 )
190193
191194
195+ @patch ('homebrew_releaser.utils.WORKING_DIR' , '' )
192196@patch ('logging.Logger.debug' )
193197@patch ('homebrew_releaser.git.Git.add' )
194198def test_replace_table_contents_no_readme (mock_git_add , mock_logger ):
@@ -197,7 +201,7 @@ def test_replace_table_contents_no_readme(mock_git_add, mock_logger):
197201 file_content = 'mock file contents' ,
198202 old_table = 'old table contents' ,
199203 new_table = 'new table contents' ,
200- homebrew_tap = './ test' ,
204+ homebrew_tap = 'test' ,
201205 )
202206
203207 mock_logger .assert_not_called ()
0 commit comments