From b2c6e0ae807979cd9b00d896e9aa457cb75ab834 Mon Sep 17 00:00:00 2001 From: frederik Date: Fri, 28 Nov 2025 17:50:34 +0100 Subject: [PATCH] fix: make git checkout in Windows possible again --- tests/test_analysis.py | 13 ++++++++++++- ...2-24-birdnet-16:19:37.wav => Pica pica_30s.wav} | Bin 2 files changed, 12 insertions(+), 1 deletion(-) rename tests/testdata/{2024-02-24-birdnet-16:19:37.wav => Pica pica_30s.wav} (100%) diff --git a/tests/test_analysis.py b/tests/test_analysis.py index 14745b2..78b38d8 100644 --- a/tests/test_analysis.py +++ b/tests/test_analysis.py @@ -10,6 +10,17 @@ from scripts.utils.analysis import filter_humans class TestRunAnalysis(unittest.TestCase): + def setUp(self): + source = os.path.join(TESTDATA, 'Pica pica_30s.wav') + self.test_file = os.path.join(TESTDATA, '2024-02-24-birdnet-16:19:37.wav') + if os.path.exists(self.test_file): + os.unlink(self.test_file) + os.symlink(source, self.test_file) + + def tearDown(self): + if os.path.exists(self.test_file): + os.unlink(self.test_file) + @patch('scripts.utils.helpers._load_settings') @patch('scripts.utils.analysis.loadCustomSpeciesList') def test_run_analysis(self, mock_loadCustomSpeciesList, mock_load_settings): @@ -18,7 +29,7 @@ class TestRunAnalysis(unittest.TestCase): mock_loadCustomSpeciesList.return_value = [] # Test file - test_file = ParseFileName(os.path.join(TESTDATA, '2024-02-24-birdnet-16:19:37.wav')) + test_file = ParseFileName(self.test_file) # Expected results expected_results = [ diff --git a/tests/testdata/2024-02-24-birdnet-16:19:37.wav b/tests/testdata/Pica pica_30s.wav similarity index 100% rename from tests/testdata/2024-02-24-birdnet-16:19:37.wav rename to tests/testdata/Pica pica_30s.wav