Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 91 - 100 of 187 for simulate (0.05 seconds)

  1. docs/zh-hant/docs/advanced/stream-data.md

    {* ../../docs_src/stream_data/tutorial002_py310.py ln[6,19:20] hl[20] *}
    
    接著在路徑操作函式中用 `response_class=PNGStreamingResponse` 使用這個新類別:
    
    {* ../../docs_src/stream_data/tutorial002_py310.py ln[23:27] hl[23] *}
    
    ### 模擬檔案 { #simulate-a-file }
    
    此範例中我們用 `io.BytesIO` 模擬檔案。它是只存在於記憶體中的類檔案物件,但提供相同的介面。
    
    例如,我們可以像讀取一般檔案一樣,透過迭代來消耗其內容。
    
    {* ../../docs_src/stream_data/tutorial002_py310.py ln[1:27] hl[3,12:13,25] *}
    
    /// note | 技術細節
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:33:04 GMT 2026
    - 4.9K bytes
    - Click Count (0)
  2. src/test/java/jcifs/smb1/smb1/TestLockingTest.java

            void urlParameterParsing() {
                String expectedUrl = "smb://server/share/test.txt";
                TestLocking t = new TestLocking();
    
                // Simulate argument parsing
                String[] args = { "-t", "2", "-i", "5", "-d", "100", expectedUrl };
                for (int ai = 0; ai < args.length; ai++) {
                    if (args[ai].equals("-t")) {
                        ai++;
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 9.9K bytes
    - Click Count (0)
  3. src/test/java/jcifs/internal/smb1/trans2/Trans2QueryFSInformationResponseTest.java

            // Test getInfo with compatible class
            response = new Trans2QueryFSInformationResponse(config, FileSystemInformation.SMB_INFO_ALLOCATION);
    
            // Simulate setting info using reflection
            SmbInfoAllocation allocation = new SmbInfoAllocation();
            setInfoField(response, allocation);
    
            SmbInfoAllocation result = response.getInfo(SmbInfoAllocation.class);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 17.9K bytes
    - Click Count (0)
  4. internal/dsync/dsync_test.go

    }
    
    // Test canceling context while quorum servers report lock not found
    func TestFailedRefreshLock(t *testing.T) {
    	if testing.Short() {
    		t.Skip("skipping test in short mode.")
    	}
    
    	// Simulate Refresh response to return no locking found
    	for i := range lockServers[:3] {
    		lockServers[i].setRefreshReply(false)
    		defer lockServers[i].setRefreshReply(true)
    	}
    
    	dm := NewDRWMutex(ds, "aap")
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 10.8K bytes
    - Click Count (0)
  5. src/test/java/jcifs/http/NtlmHttpFilterTest.java

            when(httpSession.getAttribute("NtlmHttpAuth")).thenReturn(null);
            when(httpSession.getAttribute("NtlmHttpChal")).thenReturn(null);
    
            // For this test, we'll simulate that no auth header means we should challenge
            // Since we can't mock the internal transport operations easily without real network,
            // we'll test the simpler case where no NTLM negotiation is needed
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 21 04:51:33 GMT 2025
    - 12.8K bytes
    - Click Count (0)
  6. src/test/java/org/codelibs/fess/thumbnail/impl/BaseThumbnailGeneratorTest.java

            // This simulates what happens when the condition is loaded from fess_thumbnail.xml
            generator = new TestThumbnailGenerator();
    
            // The pattern as it would be loaded from XML: "image/svg\+xml"
            // In XML, a single backslash is passed directly (no Java string escaping)
            // So we use a literal backslash here to simulate XML-loaded value
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Wed Feb 04 14:24:39 GMT 2026
    - 17.1K bytes
    - Click Count (0)
  7. src/test/java/org/codelibs/fess/ds/callback/IndexUpdateCallbackTest.java

                private long totalTime = 0;
    
                @Override
                public void store(DataStoreParams paramMap, Map<String, Object> dataMap) {
                    try {
                        Thread.sleep(10); // Simulate processing time
                    } catch (InterruptedException e) {
                        // Ignore
                    }
                    totalTime = System.currentTimeMillis() - startTime;
                }
    
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sun Jan 11 08:43:05 GMT 2026
    - 12.5K bytes
    - Click Count (0)
  8. src/test/java/org/codelibs/fess/script/ScriptEngineTest.java

            @Override
            public Object evaluate(String template, Map<String, Object> paramMap) {
                if ("error".equals(template)) {
                    // Simulate error by returning null
                    return null;
                }
                return template;
            }
        }
    
        // Test helper class
        private static class TestUser {
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Wed Jan 14 14:29:07 GMT 2026
    - 12.5K bytes
    - Click Count (0)
  9. guava/src/com/google/common/base/Stopwatch.java

     * that is already in the desired state.
     *
     * <p>When testing code that uses this class, use {@link #createUnstarted(Ticker)} or {@link
     * #createStarted(Ticker)} to supply a fake or mock ticker. This allows you to simulate any valid
     * behavior of the stopwatch.
     *
     * <p><b>Note:</b> This class is not thread-safe.
     *
     * <p><b>Warning for Android users:</b> a stopwatch with default behavior may not continue to keep
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Oct 08 18:55:33 GMT 2025
    - 9.2K bytes
    - Click Count (0)
  10. src/test/java/org/codelibs/fess/mylasta/direction/FessConfigImplTest.java

            }
        }
    
        // Test property filter returning null simulation
        @Test
        public void test_get_filterReturnsNull() {
            // The filter.null property is configured to simulate null filter behavior
            try {
                fessConfig.get("filter.null");
                fail("Should throw exception when property is not found");
            } catch (ConfigPropertyNotFoundException e) {
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Fri Mar 13 23:01:26 GMT 2026
    - 12.9K bytes
    - Click Count (0)
Back to Top