Sign Up Now!

Sign up and get personalized intelligence briefing delivered daily.


Sign Up

Articles related to "test"


Writing Tests with PyTest and Factory

  • I like to use pytest with pytest-factoryboy to generate testing data.
  • Fixtures defined in conftest.py file will be recognized in any test file.
  • "Registering" the factories lets you inject them into your tests with a lowercase-underscore class name.
  • In this same file, I'm defining fixtures with @pytest.fixture() which I'll use in my tests, and injecting them with the factories I just registered.
  • I'm passing in my fixture data into my test method, and also passing in a factory called move because that's what I'm mainly testing here.
  • In order to test player moves, I first needed to have created the players, the game, and the round, which is what I did in my conftest.py file.
  • I only need to do this once, and I don't need to import the fixtures because anything declared in conftest.py is visible to the test files.

save | comments | report | share on


libspng v0.5.0 – simple libpng alternative, up to 35% faster

  • The goal is to provide a fast PNG library with a simpler API than libpng.
  • Extract libspng-0.5.0.zip and include spng.c/spng.h in your project, you can also build with CMake or Meson.
  • All integer arithmetic is checked for overflow and all error conditions are handled gracefully.
  • The test suite consists of over 700 test cases, 175 test images are decoded with all possible output format and flag combinations and compared against libpng for correctness.
  • A compatibility layer was considered but it would need a lot of features implemented outside of libspng.
  • libspng should be safe to use with images or files of any size, at worst it will run out of memory or encounter an integer overflow, all errors are handled gracefully.
  • A previous function call encountered an irrecoverable error, most decoding errors are not recoverable.
  • Refer to the documentation on error handling.

save | comments | report | share on


One-tailed or two-tailed test, that is the question

  • An important characteristic of the one-tailed test is that it provides more power to detect an effect in one direction, as it does not test the other one.
  • We should never select the one-tailed test for the sole purpose of obtaining statistical significance, as this can lead to an invalid conclusion and in some cases dire consequences.
  • With a 5% significance level, the sample mean is considered significantly different from x when the test statistic falls into the critical region — the bottom AND top 2.5% of the test statistic’s probability distribution.
  • This results in a p-value of less than 0.05 and indicates we should reject the null hypothesis in favor of the alternative one.
  • With the obtained p-value < 0.05we have reasons to reject the null hypothesis in favor of the alternative.

save | comments | report | share on


Researchers look into keeping autonomous vehicles from becoming mobile vomitoriums

  • If you’re like me, and I’m just going to assume most of you are, motion sickness is a serious consideration on any car trip where you’re not driving.
  • Researchers are finally looking into this question with an experiment designed to see just what makes people like us so sick.
  • Basically the cars should be designed around making people actually comfortable, not stopping just short of losing their lunch.
  • The drive involved the usual turns, stops and accelerations you would experience being driven around a city, and participants were asked to perform some basic tasks on an iPad and answer questions posed by a researcher in the car.
  • It may not be front page news that people using a gadget while in a self-driving car tended to feel more sick.

save | comments | report | share on


One-tailed or two-tailed test, that is the question

  • An important characteristic of the one-tailed test is that it provides more power to detect an effect in one direction, as it does not test the other one.
  • We should never select the one-tailed test for the sole purpose of obtaining statistical significance, as this can lead to an invalid conclusion and in some cases dire consequences.
  • With a 5% significance level, the sample mean is considered significantly different from x when the test statistic falls into the critical region — the bottom AND top 2.5% of the test statistic’s probability distribution.
  • This results in a p-value of less than 0.05 and indicates we should reject the null hypothesis in favor of the alternative one.
  • With the obtained p-value < 0.05we have reasons to reject the null hypothesis in favor of the alternative.

save | comments | report | share on


More women should be assessed for BRCA mutations, new recommendations say

  • Now the USPSTF is updating its recommendation for this risk assessment to include women who personally have been diagnosed with breast, ovarian or tubal cancer in the past but completed treatment and are considered "cancer free," and those who have certain ancestries associated with BRCA1 or BRCA2 mutations, such as being of Ashkenazi Jewish descent.
  • The updated USPSTF recommendation statement clarifies that primary care clinicians should assess women with a personal or family history of breast, ovarian, tubal or peritoneal cancer for possible BRCA1 or BRCA2 mutations, said Dr. Banu Arun, professor of breast medical oncology and co-medical director of the Clinical Cancer Genetics Program at MD Anderson Cancer Center in Houston, who was not involved in the new recommendations.
  • The updated recommendation "provides an important service in recommending that primary care clinicians take a proactive stance in assessing risk for breast and ovarian cancer by documenting personal as well as family history of cancer and eliciting information regarding Ashkenazi Jewish ancestry," Newman wrote.

save | comments | report | share on


The US just entered a great power arms race in a big way — and Russia and China are panicking

  • The US military conducted its first flight test of a conventional ground-launched cruise missile on Sunday, firing off a missile that would have been banned under the Intermediate-Range Nuclear Forces (INF) Treaty a little over two weeks prior.
  • When the US formally withdrew from the treaty at the start of August, Secretary of Defense Mark Esper explained that the "Department of Defense will fully pursue the development of these ground-launched conventional missiles." Sixteen days later, the US tested its first post-INF missile — alarming not only Moscow, but also Beijing.
  • The weapon tested Sunday, as The War Zone explains, was a ground-launched BGM-109 Tomahawk, a variant of the BGM-109G Gryphon, one of the US missile systems that, together with the Pershing II mid-range ballistic missile, comprised the forward-deployed tactical nuclear forces in Europe before the INF Treaty was signed and all relevant weapon systems were destroyed.

save | comments | report | share on


Russia to nuclear test-ban monitoring group: Mysterious, deadly test accident is actually none of your business

  • MOSCOW (Reuters) - Russia on Tuesday told an international organisation set up to verify a ban on nuclear tests that a military testing accident in northern Russia earlier this month was none of its business and that handing it radiation data was entirely voluntary.
  • The Vienna-based Comprehensive Nuclear-Test-Ban Treaty Organization (CTBTO) said on Monday that two Russian monitoring sites closest to the mysterious explosion went offline days after the blast, soon followed by two more, fuelling suspicions that Russia tampered with them.
  • Russia's state nuclear agency, Rosatom, has acknowledged that nuclear workers were killed in the explosion on Aug. 8, which occurred during a rocket engine test near the White Sea in far northern Russia.
  • The Interfax news agency on Tuesday cited Deputy Russian Foreign Minister Sergei Ryabkov as saying his country's transmission of data from radiation stations to the CTBTO was voluntary and that the Aug. 8 accident was not a matter for the CTBTO anyway.

save | comments | report | share on


Waymo expands driverless car testing to Florida

  • The company says that in the coming weeks, it’ll bring both its modified Chrysler Pacifica minivans and a Jaguar I-Pace to the Sunshine State to drive on a closed track in heavy rain, ahead of testing on public Miami roads later in the month.
  • And more recently, the company pledged to open an 85,000-square-foot technical service center in the city of Mesa, Arizona, near Phoenix’s East Valley, which it expects will “more than double” its capacity to maintain the fleet of cars in Waymo One. Waymo also announced last year that it would add up to 62,000 minivans to its fleet, and said that it had signed a deal with Jaguar Land Rover to equip 20,000 of the automaker’s Jaguar i-Pace electric SUVs with its autonomous system by 2020.

save | comments | report | share on


Waymo self-driving cars head to Florida for rainy season

  • Waymo is taking some of its autonomous vehicles to Florida just in time for hurricane season to begin testing in heavy rain.
  • The move to Florida will focus on testing how its myriad of sensors hold up during the region’s rainy season as well as to collect data.
  • Waymo will bring both of its autonomous vehicles, the Chrysler Pacificas and a Jaguar I-Pace, to Naples and Miami, Florida for testing, according to a blog posted Tuesday.
  • The self-driving car company, which is a business under Alphabet, began testing its autonomous vehicles in and around Mountain View, Calif., before branching out to other cities and weather, including Novi, Michigan, Kirkland, Washington and San Francisco.
  • Ford and Argo AI, the self-driving company it backs, have had a presence in the Miami since early 2018.
  • Argo AI began collecting data and mapping and has since expanded to testing in autonomous mode last summer.

save | comments | report | share on