import pytest
from contextlib import contextmanager
from pyroSAR._dev_config import ExamineExe
from pyroSAR.snap.auxil import ExamineSnap

@contextmanager
def not_raises(ExpectedException):
    try:
        yield

    except ExpectedException:
        raise AssertionError(
            "Did raise exception {0} when it should not!".format(
                repr(ExpectedException)
            )
        )

    except Exception:
        raise AssertionError(
            "An unexpected exception {0} raised.".format(repr(Exception))
        )

class TestExemineExe:
    def test_exception(self):
        with pytest.warns(UserWarning):
            ExamineExe.examine('some_exe_file.exe')

    def test_warn_snap(self):
        with pytest.warns(UserWarning):
            ExamineExe.examine('snap')
    # def test_not_exception(self):
    #     SNAP_EXECUTABLE = ['snap64.exe', 'snap32.exe', 'snap.exe', 'snap']
    #     with not_raises(ValueError):
    #         ExamineExe.examine(SNAP_EXECUTABLE)

class TestExamineSnap:
    def test_exception(self):
        with pytest.warns(UserWarning):
            ExamineExe.examine('some_exe_file.exe')

    # def test_not_exception(self):
    #     with not_raises(AssertionError):
    #         test_snap_exe = ExamineSnap()
@@ -1,18 +1,4 @@
-import pytest%0A
 from
@@ -31,16 +31,32 @@
 manager%0A
+%0Aimport pytest%0A%0A
 from pyr
@@ -134,16 +134,17 @@
 neSnap%0A%0A
+%0A
 @context
@@ -538,16 +538,17 @@
      )%0A%0A
+%0A
 class Te
@@ -691,119 +691,8 @@
 %0A   
- def test_warn_snap(self):%0A        with pytest.warns(UserWarning):%0A            ExamineExe.examine('snap')%0A    #
  def
@@ -717,26 +717,24 @@
 n(self):%0A   
- #
      SNAP_EX
@@ -792,26 +792,24 @@
  'snap'%5D%0A   
- #
      with no
@@ -810,45 +810,50 @@
 ith 
-not_raises(ValueError)
+pytest.warns(None) as record
 :%0A    
-#
         
  Exa
@@ -840,33 +840,32 @@
 rd:%0A            
- 
 ExamineExe.exami
@@ -884,16 +884,49 @@
 UTABLE)%0A
+        assert len(record) == 1%0A%0A
 %0Aclass T
@@ -1026,36 +1026,45 @@
      Examine
-Exe.examine(
+Snap(snap_executable=
 'some_exe_fi
@@ -1076,18 +1076,16 @@
 e')%0A%0A   
- #
  def tes
@@ -1115,60 +1115,59 @@
     
-#
     
- 
 with 
-not_raises(AssertionError)
+pytest.warns(None) as record
 :%0A    
-#
         
  tes
@@ -1166,34 +1166,50 @@
     
- test_snap_exe = ExamineSnap()
+ExamineSnap()%0A        assert len(record) == 0%0A

Add unit test to determine if the classes ExamineExe and ExamineSnap will work properly.