Beispiel #1
0
    def test_is_zipfile(self, zip_location):
        assert not current_zipfile()

        with mock.patch.object(sys, 'argv', [zip_location]):
            assert isinstance(current_zipfile(), ZipFile)
Beispiel #2
0
 def test_argv0_is_not_zipfile(self):
     with current_zipfile() as zipfile:
         assert not zipfile
Beispiel #3
0
 def test_argv0_is_not_zipfile(self):
     assert not current_zipfile()
Beispiel #4
0
 def test_is_zipfile(self, zip_location):
     with mock.patch.object(sys, "argv", [zip_location]):
         with current_zipfile() as zipfile:
             assert isinstance(zipfile, ZipFile)
Beispiel #5
0
    def test_is_zipfile(self, zip_location):
        assert not current_zipfile()

        with mock.patch.object(sys, 'argv', [zip_location]):
            assert isinstance(current_zipfile(), ZipFile)