import unittest
import os
import librosa
import numpy as np

import nlpaug.augmenter.audio as naa


class TestNoise(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        # https://freewavesamples.com/yamaha-v50-rock-beat-120-bpm
        cls.sample_wav_file = os.path.abspath(os.path.join(
            os.path.dirname(__file__), '..', '..', '..', 'data', 'Yamaha-V50-Rock-Beat-120bpm.wav'))

    def testSubsitute(self):
        audio, sampling_rate = librosa.load(self.sample_wav_file)
        
        aug = naa.ShiftAug(sampling_rate, shift_max=0.5)
        augmented_audio = aug.augment(audio)

        self.assertFalse(np.array_equal(audio, augmented_audio))
        self.assertTrue(len(audio), len(augmented_audio))

@@ -52,16 +52,47 @@
 py as np
+%0Afrom dotenv import load_dotenv
 %0A%0Aimport
@@ -202,16 +202,175 @@
 s(cls):%0A
+        env_config_path = os.path.abspath(os.path.join(%0A            os.path.dirname(__file__), '..', '..', '..', '.env'))%0A        load_dotenv(env_config_path)%0A
         
@@ -465,99 +465,33 @@
  os.
-path.abspath(os.path.join(%0A            os.path.dirname(__file__), '..', '..', '..', 'data',
+environ.get(%22DATA_DIR%22) +
  'Ya
@@ -520,18 +520,16 @@
 bpm.wav'
-))
 %0A%0A    de

Standardize test case format