@@ -0,0 +1,1412 @@
+# Copyright 2020 Google LLC%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A#     https://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by applicable law or agreed to in writing, software%0A# distributed under the License is distributed on an %22AS IS%22 BASIS,%0A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A# See the License for the specific language governing permissions and%0A# limitations under the License.%0A%0A%22%22%22Testing for mixing_in_negative_samples.py.%22%22%22%0A%0Aimport csv%0Aimport os%0Aimport unittest%0Afrom unittest import TestCase%0A%0Afrom mixing_in_negative_samples import calculate_number_of_synthetic_data_to_mix%0A%0ATEMP_FILE_PATH = %22./temp_test_mixing_in_negative_samples.tsv%22%0A%0Aclass MixingInNegativeSamplesTest(TestCase):    %0A    def test_calculate_number_of_synthetic_data(self):%0A        with open(TEMP_FILE_PATH, %22wt%22) as f:%0A            tsv_writer = csv.writer(f, delimiter='%5Ct') %0A            for i in range(50):%0A                tsv_writer.writerow(%5B%220%22%5D)%0A            for i in range(60):%0A                tsv_writer.writerow(%5B%221%22%5D)%0A        output = calculate_number_of_synthetic_data_to_mix(TEMP_FILE_PATH, 0.8)%0A        os.remove(TEMP_FILE_PATH)%0A        self.assertEqual(output, 190)%0A        %0A        %0Aif __name__ == '__main__':%0A    unittest.main()%0A

Create mixing_in_negative_samples_test.py